public class HttpRequest extends Object
Constructor and Description |
---|
HttpRequest(String method,
String encodedPath) |
HttpRequest(String method,
String encodedPath,
HttpHeader[] headers,
HttpRequestBodyStream bodyStream) |
Modifier and Type | Method and Description |
---|---|
void |
addHeader(HttpHeader header) |
void |
addHeader(String headerName,
String headerValue) |
void |
addHeaders(HttpHeader[] headers) |
HttpRequestBodyStream |
getBodyStream() |
String |
getEncodedPath() |
List<HttpHeader> |
getHeaders() |
HttpHeader[] |
getHeadersAsArray() |
String |
getMethod() |
byte[] |
marshalForJni()
Requests are marshalled as follows:
each string field is:
[4-bytes BE] [variable length bytes specified by the previous field]
Each request is then:
[method][path][header name-value pairs]
|
void |
setEncodedPath(String encodedPath) |
public HttpRequest(String method, String encodedPath)
method
- http verb to useencodedPath
- path of the http requestpublic HttpRequest(String method, String encodedPath, HttpHeader[] headers, HttpRequestBodyStream bodyStream)
method
- http verb to useencodedPath
- path of the http requestheaders
- set of http request headers to includebodyStream
- (optional) interface to an object that will stream out the request bodypublic String getMethod()
public String getEncodedPath()
public void setEncodedPath(String encodedPath)
public List<HttpHeader> getHeaders()
public HttpHeader[] getHeadersAsArray()
public void addHeader(HttpHeader header)
public void addHeaders(HttpHeader[] headers)
public HttpRequestBodyStream getBodyStream()
public byte[] marshalForJni()
Copyright © 2021. All rights reserved.