Package septogeddon.pluginquery.http
Class ProtocolRequest
java.lang.Object
java.io.InputStream
io.netty.buffer.ByteBufInputStream
septogeddon.pluginquery.http.ProtocolRequest
- All Implemented Interfaces:
Closeable
,DataInput
,AutoCloseable
public class ProtocolRequest
extends io.netty.buffer.ByteBufInputStream
The request data sent from the client/browser. This is also an InputStream.
-
Constructor Summary
ConstructorDescriptionProtocolRequest
(HTTPContext context, ProtocolMethod method, ProtocolPath path, String version, Map<String, HTTPHeader> headers, io.netty.buffer.ByteBuf content) -
Method Summary
Modifier and TypeMethodDescriptiongetHeaderValue
(String name) Get the header valueGet the HTTP contextGet the method of this requestgetPath()
Get the path of this requestGet the protocol version of this request (e.g.Methods inherited from class io.netty.buffer.ByteBufInputStream
available, mark, markSupported, read, read, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, reset, skip, skipBytes
Methods inherited from class java.io.InputStream
close, nullInputStream, read, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
ProtocolRequest
public ProtocolRequest(HTTPContext context, ProtocolMethod method, ProtocolPath path, String version, Map<String, HTTPHeader> headers, io.netty.buffer.ByteBuf content)
-
-
Method Details
-
getHTTPContext
Get the HTTP context- Returns:
- HTTPContext instance
-
getHeaderValue
Get the header value- Parameters:
name
- the header name- Returns:
- the header value
-
getMethod
Get the method of this request- Returns:
- HTTP method
-
getPath
Get the path of this request- Returns:
- HTTP path URL
-
getVersion
Get the protocol version of this request (e.g. HTTP/1.1)- Returns:
- the protocol version
-