public class OperationRequestFactory extends Object
OperationRequests.| Constructor and Description |
|---|
OperationRequestFactory() |
| Modifier and Type | Method and Description |
|---|---|
OperationRequest |
create(URI uri,
HttpMethod method,
byte[] content,
HttpHeaders headers,
Parameters parameters,
Collection<OperationRequestPart> parts)
Creates a new
OperationRequest. |
OperationRequest |
createFrom(OperationRequest original,
byte[] newContent)
Creates a new
OperationRequest based on the given original but with
the given newContent. |
OperationRequest |
createFrom(OperationRequest original,
HttpHeaders newHeaders)
Creates a new
OperationRequest based on the given original but with
the given newHeaders. |
public OperationRequest create(URI uri, HttpMethod method, byte[] content, HttpHeaders headers, Parameters parameters, Collection<OperationRequestPart> parts)
OperationRequest. The given headers will be augmented
to ensure that they always include a Content-Length header if the request
has any content and a Host header.uri - the request's urimethod - the request methodcontent - the content of the requestheaders - the request's headersparameters - the request's parametersparts - the request's partsOperationRequestpublic OperationRequest createFrom(OperationRequest original, byte[] newContent)
OperationRequest based on the given original but with
the given newContent. If the original request had a Content-Length
header it will be modified to match the length of the new content.original - The original requestnewContent - The new contentpublic OperationRequest createFrom(OperationRequest original, HttpHeaders newHeaders)
OperationRequest based on the given original but with
the given newHeaders.original - The original requestnewHeaders - The new headers