public class RequestBuilder extends RequestBuilderBase<RequestBuilder>
Request
.
Warning: mutable and not thread-safe! Beware that it holds a reference on the Request instance it builds,
so modifying the builder will modify the request even after it has been built.queryComputer, queryParams, request, signatureCalculator
Constructor and Description |
---|
RequestBuilder() |
RequestBuilder(Request prototype) |
RequestBuilder(Request prototype,
QueryComputer queryComputer) |
RequestBuilder(String method) |
RequestBuilder(String method,
boolean useRawUrl) |
RequestBuilder(String method,
QueryComputer queryComputer) |
resetCookies, resetFormParams, resetMultipartData, resetNonMultipartData, resetQuery, setBody, setBody, setBodyEncoding, setConnectionPoolKeyStrategy, setContentLength, setCookies, setInetAddress, setLocalInetAddress, setRangeOffset, setRealm, setRequestTimeout, setSignatureCalculator, setUri
public RequestBuilder()
public RequestBuilder(String method)
public RequestBuilder(String method, boolean useRawUrl)
public RequestBuilder(String method, QueryComputer queryComputer)
public RequestBuilder(Request prototype)
public RequestBuilder(Request prototype, QueryComputer queryComputer)
public RequestBuilder addBodyPart(Part part)
addBodyPart
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder addCookie(Cookie cookie)
addCookie
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder addHeader(String name, String value)
addHeader
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder addFormParam(String key, String value)
addFormParam
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder addQueryParam(String name, String value)
addQueryParam
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder addQueryParams(List<Param> queryParams)
addQueryParams
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder setQueryParams(List<Param> params)
setQueryParams
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder setQueryParams(Map<String,List<String>> params)
setQueryParams
in class RequestBuilderBase<RequestBuilder>
public Request build()
build
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder setBody(byte[] data)
setBody
in class RequestBuilderBase<RequestBuilder>
@Deprecated public RequestBuilder setBody(InputStream stream)
RequestBuilderBase.setBody(BodyGenerator)
setBody(new InputStreamBodyGenerator(inputStream))setBody
in class RequestBuilderBase<RequestBuilder>
stream
- - An InputStream
RequestBuilder
IllegalArgumentException
InputStreamBodyGenerator(inputStream)
,
InputStreamBodyGenerator
public RequestBuilder setBody(String data)
setBody
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder setHeader(String name, String value)
setHeader
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder setHeaders(FluentCaseInsensitiveStringsMap headers)
setHeaders
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder setHeaders(Map<String,Collection<String>> headers)
setHeaders
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder setFormParams(List<Param> params)
setFormParams
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder setFormParams(Map<String,List<String>> params)
setFormParams
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder setMethod(String method)
setMethod
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder setUrl(String url)
setUrl
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder setProxyServer(ProxyServer proxyServer)
setProxyServer
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder setVirtualHost(String virtualHost)
setVirtualHost
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder setFollowRedirects(boolean followRedirects)
setFollowRedirects
in class RequestBuilderBase<RequestBuilder>
public RequestBuilder addOrReplaceCookie(Cookie c)
addOrReplaceCookie
in class RequestBuilderBase<RequestBuilder>
Copyright © 2014. All Rights Reserved.