public static interface Request.Builder extends Common<Request.Builder>, Buildable<Request>
| Modifier and Type | Method and Description |
|---|---|
ResponsePromise |
delete()
Executes this request through the
HttpClient service as a DELETE operation. |
ResponsePromise |
execute(Request.Method method)
Executes this request through the
HttpClient service using the given HTTP method. |
ResponsePromise |
get()
Executes this request through the
HttpClient service as a GET operation. |
ResponsePromise |
head()
Executes this request through the
HttpClient service as a HEAD operation. |
ResponsePromise |
options()
Executes this request through the
HttpClient service as a OPTIONS operation. |
ResponsePromise |
post()
Executes this request through the
HttpClient service as a POST operation. |
ResponsePromise |
put()
Executes this request through the
HttpClient service as a PUT operation. |
Request.Builder |
setAccept(String accept)
Sets the Accept header for the request.
|
Request.Builder |
setAttribute(String name,
String value)
Sets an attribute on the request.
|
Request.Builder |
setAttributes(Map<String,String> properties)
Sets attributes on the request.
|
Request.Builder |
setCacheDisabled()
Bypasses the cache for this request
|
Request.Builder |
setContentLength(long contentLength)
Set the content length for the message.
|
Request.Builder |
setEntity(EntityBuilder entityBuilder)
Sets the entity and any associated headers from an entity builder.
|
Request.Builder |
setHeader(String name,
String value)
Sets an HTTP header on this object.
|
Request.Builder |
setUri(URI uri)
Sets this request's URI.
|
ResponsePromise |
trace()
Executes this request through the
HttpClient service as a TRACE operation. |
setContentCharset, setContentType, setEntity, setEntityStream, setEntityStream, setHeadersRequest.Builder setUri(URI uri)
uri - The URIRequest.Builder setAccept(String accept)
accept - An accept header expression containing media types, ranges, and/or quality factorsRequest.Builder setCacheDisabled()
Request.Builder setAttribute(String name, String value)
name - The attribute namevalue - The attribute valueRequest.Builder setAttributes(Map<String,String> properties)
properties - A map of attributesRequest.Builder setContentLength(long contentLength)
contentLength - The content length. This must be valid (greater than 0).Request.Builder setEntity(EntityBuilder entityBuilder)
entityBuilder - An entity builderRequest.Builder setHeader(String name, String value)
CommonsetHeader in interface Common<Request.Builder>name - The name of the header to be setvalue - The value of the header to be setResponsePromise get()
HttpClient service as a GET operation.
The request SHOULD NOT contain an entity for the GET operation.ResponsePromise post()
HttpClient service as a POST operation.
The request SHOULD contain an entity for the POST operation.ResponsePromise put()
HttpClient service as a PUT operation.
The request SHOULD contain an entity for the PUT operation.ResponsePromise delete()
HttpClient service as a DELETE operation.
The request SHOULD NOT contain an entity for the DELETE operation.ResponsePromise options()
HttpClient service as a OPTIONS operation.
The request MAY contain an entity for the OPTIONS operation.ResponsePromise head()
HttpClient service as a HEAD operation.
The request SHOULD NOT contain an entity for the HEAD operation.ResponsePromise trace()
HttpClient service as a TRACE operation.
The request SHOULD contain an entity for the TRACE operation.ResponsePromise execute(Request.Method method)
HttpClient service using the given HTTP method.method - the HTTP method to use.Copyright © 2012–2018 Atlassian. All rights reserved.