Package org.microproxy.http
Interface HttpRequest
- All Superinterfaces:
HttpMessage,HttpObject
- All Known Subinterfaces:
FullHttpRequest
- All Known Implementing Classes:
DefaultFullHttpRequest,DefaultHttpRequest
The head of an HTTP request.
-
Method Summary
Modifier and TypeMethodDescriptionmethod()Returns the request method.setMethod(HttpMethod method) Changes the request method.setProtocolVersion(HttpVersion version) Changes the message's protocol version.Changes the request-target.uri()Returns the request-target exactly as it appears on the request line.Methods inherited from interface org.microproxy.http.HttpMessage
headers, protocolVersion
-
Method Details
-
method
HttpMethod method()Returns the request method.- Returns:
- the request method
-
setMethod
Changes the request method.- Parameters:
method- new request method- Returns:
- this request
-
uri
String uri()Returns the request-target exactly as it appears on the request line.- Returns:
- the request-target exactly as it appears on the request line
-
setUri
Changes the request-target.- Parameters:
uri- new request-target, without whitespace or control characters- Returns:
- this request
- Throws:
IllegalArgumentException- if the target is empty or contains invalid characters
-
setProtocolVersion
Description copied from interface:HttpMessageChanges the message's protocol version.- Specified by:
setProtocolVersionin interfaceHttpMessage- Parameters:
version- new protocol version- Returns:
- this message
-