public static class HttpRequestPacket.Builder extends HttpHeader.Builder<HttpRequestPacket.Builder>
Modifier and Type | Field and Description |
---|---|
protected String |
host |
protected Method |
method |
protected String |
methodString |
protected String |
queryString |
protected String |
uri |
chunked, contentLength, contentType, mimeHeaders, protocol, protocolString, upgrade
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
HttpRequestPacket |
build()
Build the HttpRequestPacket message.
|
protected HttpHeader |
create() |
HttpRequestPacket.Builder |
host(String host)
Set the value for the Host header.
|
HttpRequestPacket.Builder |
method(Method method)
Set the HTTP request method.
|
HttpRequestPacket.Builder |
method(String method)
Set the HTTP request method.
|
HttpRequestPacket.Builder |
query(String queryString)
Set the
query portion of the request URI. |
void |
reset() |
HttpRequestPacket.Builder |
uri(String uri)
Set the request URI.
|
chunked, contentLength, contentType, header, header, maxNumHeaders, protocol, protocol, removeHeader, removeHeader, upgrade
protected Method method
protected String methodString
protected String uri
protected String queryString
protected String host
public HttpRequestPacket.Builder method(Method method)
method
- the HTTP request method..public HttpRequestPacket.Builder method(String method)
method
- the HTTP request method. Format is "GET|POST...".public HttpRequestPacket.Builder uri(String uri)
uri
- the request URI.public HttpRequestPacket.Builder host(String host)
host
- the value for the Host header.public HttpRequestPacket.Builder query(String queryString)
query
portion of the request URI.queryString
- the query StringBuilder
public final HttpRequestPacket build()
build
in class HttpHeader.Builder<HttpRequestPacket.Builder>
public void reset()
reset
in class HttpHeader.Builder<HttpRequestPacket.Builder>
protected HttpHeader create()
create
in class HttpHeader.Builder<HttpRequestPacket.Builder>
Copyright © 2015 Oracle Corporation. All rights reserved.