public class HttpParser extends MessageParser
| Constructor and Description |
|---|
HttpParser() |
| Modifier and Type | Method and Description |
|---|---|
MessageHeaders |
headers() |
boolean |
isError() |
boolean |
isFinished() |
void |
lenientRequest()
Configures the parser to read a HTTP request while allowing some deviations from the standard:
The number of spaces in the request line may vary
Any character except space and newline is allowed in the target
Lines may end with LF instead of CRLF
Any byte except LF is allowed in header field values
Whitespace is allowed between the field name and colon
|
void |
lenientResponse()
Configures the parser to read a HTTP response while allowing some deviations from the standard:
The number of spaces in the status line may vary
Lines may end with LF instead of CRLF
Any byte except LF is allowed in header field values
Whitespace is allowed between the field name and colon
|
String |
method() |
void |
parse(ByteBuffer data)
Runs the parser on a buffer of data.
|
void |
parse(ReadableByteChannel channel,
ByteBuffer buffer) |
String |
reason() |
void |
reset() |
int |
status() |
void |
strictRequest()
Configures the parser to read a HTTP request while rejecting deviations from the standard.
|
void |
strictResponse()
Configures the parser to read a HTTP response while rejecting deviations from the standard.
|
String |
target() |
MessageVersion |
version() |
emitWarning, getErrorContext, getErrorContextpublic void reset()
public MessageHeaders headers()
public MessageVersion version()
public int status()
public String reason()
public String target()
public String method()
public boolean isFinished()
public boolean isError()
public void strictRequest()
public void strictResponse()
public void lenientRequest()
public void lenientResponse()
public void parse(ByteBuffer data)
public void parse(ReadableByteChannel channel, ByteBuffer buffer) throws IOException
IOExceptionCopyright © 2024. All rights reserved.