public class RequestBuilder extends Object
HttpUriRequest
instances.
Please note that this class treats parameters differently depending on composition
of the request: if the request has a content entity explicitly set with
setEntity(org.apache.http.HttpEntity)
or it is not an entity enclosing method
(such as POST or PUT), parameters will be added to the query component of the request URI.
Otherwise, parameters will be added as a URL encoded entity
.
public static RequestBuilder create(String method)
public static RequestBuilder get()
public static RequestBuilder get(URI uri)
public static RequestBuilder get(String uri)
public static RequestBuilder head()
public static RequestBuilder head(URI uri)
public static RequestBuilder head(String uri)
public static RequestBuilder patch()
public static RequestBuilder patch(URI uri)
public static RequestBuilder patch(String uri)
public static RequestBuilder post()
public static RequestBuilder post(URI uri)
public static RequestBuilder post(String uri)
public static RequestBuilder put()
public static RequestBuilder put(URI uri)
public static RequestBuilder put(String uri)
public static RequestBuilder delete()
public static RequestBuilder delete(URI uri)
public static RequestBuilder delete(String uri)
public static RequestBuilder trace()
public static RequestBuilder trace(URI uri)
public static RequestBuilder trace(String uri)
public static RequestBuilder options()
public static RequestBuilder options(URI uri)
public static RequestBuilder options(String uri)
public static RequestBuilder copy(org.apache.http.HttpRequest request)
public RequestBuilder setCharset(Charset charset)
public Charset getCharset()
public String getMethod()
public org.apache.http.ProtocolVersion getVersion()
public RequestBuilder setVersion(org.apache.http.ProtocolVersion version)
public URI getUri()
public RequestBuilder setUri(URI uri)
public RequestBuilder setUri(String uri)
public org.apache.http.Header getFirstHeader(String name)
public org.apache.http.Header getLastHeader(String name)
public org.apache.http.Header[] getHeaders(String name)
public RequestBuilder addHeader(org.apache.http.Header header)
public RequestBuilder addHeader(String name, String value)
public RequestBuilder removeHeader(org.apache.http.Header header)
public RequestBuilder removeHeaders(String name)
public RequestBuilder setHeader(org.apache.http.Header header)
public RequestBuilder setHeader(String name, String value)
public org.apache.http.HttpEntity getEntity()
public RequestBuilder setEntity(org.apache.http.HttpEntity entity)
public List<org.apache.http.NameValuePair> getParameters()
public RequestBuilder addParameter(org.apache.http.NameValuePair nvp)
public RequestBuilder addParameter(String name, String value)
public RequestBuilder addParameters(org.apache.http.NameValuePair... nvps)
public RequestConfig getConfig()
public RequestBuilder setConfig(RequestConfig config)
public HttpUriRequest build()
Copyright © 1999–2022 The Apache Software Foundation. All rights reserved.