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 URIendpointprotected com.google.common.collect.ImmutableList.Builder<HttpRequestFilter>filtersprotected Stringmethod-
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 TaddFormParam(String name, String... values)TaddFormParams(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.TaddQueryParam(String name, Iterable<String> values)TaddQueryParam(String name, String... values)TaddQueryParams(com.google.common.collect.Multimap<String,String> parameters)HttpRequestbuild()Tendpoint(String endpoint)Tendpoint(URI endpoint)Tfilter(HttpRequestFilter filter)Tfilters(Iterable<HttpRequestFilter> filters)TfromHttpRequest(HttpRequest in)Tmethod(String method)TreplaceFormParam(String name, String... values)TreplaceFormParams(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.TreplacePath(String path)TreplaceQueryParam(String name, Iterable<String> values)TreplaceQueryParam(String name, String... values)TreplaceQueryParams(com.google.common.collect.Multimap<String,String> parameters)TreplaceQueryParams(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:
buildin classHttpMessage.Builder<T extends HttpRequest.Builder<T>>
-
fromHttpRequest
public T fromHttpRequest(HttpRequest in)
-
-