Tuesday, November 16, 2010

Http Request Headers

To get client browser information :
String client = request.getHeader("User-Agent");

To get content length :
String content = request.getHeader("Content-Length");

To get router hops allowed for request :
String maxForwards = request.getHeader("Max-Forwards");

To get accepted encoding details :
String encoding = request.getHeader("Accept-Encoding");

To get language details :
String language = request.getHeader("Accept-Language");

To get content-type or mime type details :
String mime = request.getHeader("Accept");

To get character set details :
String characterSet = request.getHeader("Accept-Charset");

To get connection status :
String status = request.getHeader("Connection");

No comments:

Post a Comment