Interface HTTPRequest
public interface HTTPRequest
Details of an HTTP Request from a web server.
- Since:
- 4.0
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Close the request.byte[]Returns a byte array containing the request content.Get specified header.Get headers.Get the method Name.getParameter(String name) Get specified parameter.getPath()Returns the path of request URL.Get the remote address of the HTTP request.longReturn the request time.getURL()Returns the request URL.voidwriteResponse(ByteBuffer buffer) Write a response.
- 
Method Details- 
getMethodNameString getMethodName()Get the method Name.- Returns:
- the method name
 
- 
getURLString getURL()Returns the request URL.- Returns:
- string representation of the URL
 
- 
getPathString getPath()Returns the path of request URL.- Returns:
- string representation of the path of the URL
 
- 
getHeaderGet specified header.- Parameters:
- name- header name
- Returns:
- header value or null if no such header
 
- 
getHeadersGet headers.Return all of the headers - Returns:
- a HashMap of the headers contained within the request
- Since:
- 4.1
 
- 
getRemoteAddressString getRemoteAddress()Get the remote address of the HTTP request. If this has been forwarded-for, the forwarded for address will be used- Returns:
- the remote IP Address
- Since:
- 4.1
 
- 
getParameterGet specified parameter.- Parameters:
- name- parameter name
- Returns:
- parameter value or null if no such parameter
 
- 
getContentbyte[] getContent()Returns a byte array containing the request content.- Returns:
- byte array which could be zero length
 
- 
getTimestamplong getTimestamp()Return the request time.- Returns:
- the time in measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.
 
- 
writeResponseWrite a response.This will write the contents of the supplied buffer from its position to its limit. - Parameters:
- buffer- containing the response
- Throws:
- APIException- if unable to write
 
- 
closevoid close()Close the request.This closes its underlying channel. 
 
-