Package org.jclouds.http
Class HttpRequest.Builder<T extends HttpRequest.Builder<T>>
- java.lang.Object
-
- org.jclouds.http.HttpMessage.Builder<T>
-
- org.jclouds.http.HttpRequest.Builder<T>
-
- Direct Known Subclasses:
GeneratedHttpRequest.Builder
- Enclosing class:
- HttpRequest
public abstract static class HttpRequest.Builder<T extends HttpRequest.Builder<T>> extends HttpMessage.Builder<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected URI
endpoint
protected com.google.common.collect.ImmutableList.Builder<HttpRequestFilter>
filters
protected String
method
-
Fields inherited from class org.jclouds.http.HttpMessage.Builder
headers, payload
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
addFormParam(String name, String... values)
T
addFormParams(com.google.common.collect.Multimap<String,String> parameters)
Replaces the current payload with one that is a urlencoded payload including the following parameters and any formerly set.T
addQueryParam(String name, Iterable<String> values)
T
addQueryParam(String name, String... values)
T
addQueryParams(com.google.common.collect.Multimap<String,String> parameters)
HttpRequest
build()
T
endpoint(String endpoint)
T
endpoint(URI endpoint)
T
filter(HttpRequestFilter filter)
T
filters(Iterable<HttpRequestFilter> filters)
T
fromHttpRequest(HttpRequest in)
T
method(String method)
T
replaceFormParam(String name, String... values)
T
replaceFormParams(com.google.common.collect.Multimap<String,String> parameters)
Replaces the current payload with one that is a urlencoded payload including the following parameters and any formerly set.T
replacePath(String path)
T
replaceQueryParam(String name, Iterable<String> values)
T
replaceQueryParam(String name, String... values)
T
replaceQueryParams(com.google.common.collect.Multimap<String,String> parameters)
T
replaceQueryParams(Map<String,String> parameters)
-
Methods inherited from class org.jclouds.http.HttpMessage.Builder
addHeader, fromHttpMessage, headers, payload, payload, payload, payload, payload, payload, removeHeader, replaceHeader, replaceHeaders, self
-
-
-
-
Field Detail
-
method
protected String method
-
endpoint
protected URI endpoint
-
filters
protected com.google.common.collect.ImmutableList.Builder<HttpRequestFilter> filters
-
-
Method Detail
-
method
public T method(String method)
- See Also:
HttpRequest.getMethod()
-
endpoint
public T endpoint(URI endpoint)
- See Also:
HttpRequest.getEndpoint()
-
endpoint
public T endpoint(String endpoint)
- See Also:
HttpRequest.getEndpoint()
-
addQueryParam
public T addQueryParam(String name, Iterable<String> values)
- See Also:
HttpRequest.getEndpoint()
-
addQueryParam
public T addQueryParam(String name, String... values)
- See Also:
HttpRequest.getEndpoint()
-
addQueryParams
public T addQueryParams(com.google.common.collect.Multimap<String,String> parameters)
- See Also:
HttpRequest.getEndpoint()
-
replaceQueryParam
public T replaceQueryParam(String name, Iterable<String> values)
- See Also:
HttpRequest.getEndpoint()
-
replaceQueryParam
public T replaceQueryParam(String name, String... values)
- See Also:
HttpRequest.getEndpoint()
-
replaceQueryParams
public T replaceQueryParams(Map<String,String> parameters)
- See Also:
HttpRequest.getEndpoint()
-
replaceQueryParams
public T replaceQueryParams(com.google.common.collect.Multimap<String,String> parameters)
- See Also:
HttpRequest.getEndpoint()
-
replacePath
public T replacePath(String path)
- See Also:
HttpRequest.getEndpoint()
-
addFormParams
public T addFormParams(com.google.common.collect.Multimap<String,String> parameters)
Replaces the current payload with one that is a urlencoded payload including the following parameters and any formerly set.- See Also:
PayloadEnclosingImpl.getPayload()
-
replaceFormParams
public T replaceFormParams(com.google.common.collect.Multimap<String,String> parameters)
Replaces the current payload with one that is a urlencoded payload including the following parameters and any formerly set.- See Also:
PayloadEnclosingImpl.getPayload()
-
filters
public T filters(Iterable<HttpRequestFilter> filters)
- See Also:
HttpRequest.getFilters()
-
filter
public T filter(HttpRequestFilter filter)
- See Also:
HttpRequest.getFilters()
-
build
public HttpRequest build()
- Overrides:
build
in classHttpMessage.Builder<T extends HttpRequest.Builder<T>>
-
fromHttpRequest
public T fromHttpRequest(HttpRequest in)
-
-