public class ClassicRequestBuilder extends AbstractRequestBuilder<ClassicHttpRequest>
ClassicHttpRequest
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(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.
digest, getAuthority, getCharset, getMethod, getParameters, getPath, getScheme, getUri, isAbsoluteRequestUri
digest, getFirstHeader, getFirstHeaders, getHeaders, getHeaders, getLastHeader, getVersion, setHeaders
public static ClassicRequestBuilder create(String method)
public static ClassicRequestBuilder get()
public static ClassicRequestBuilder get(URI uri)
public static ClassicRequestBuilder get(String uri)
public static ClassicRequestBuilder head()
public static ClassicRequestBuilder head(URI uri)
public static ClassicRequestBuilder head(String uri)
public static ClassicRequestBuilder patch()
public static ClassicRequestBuilder patch(URI uri)
public static ClassicRequestBuilder patch(String uri)
public static ClassicRequestBuilder post()
public static ClassicRequestBuilder post(URI uri)
public static ClassicRequestBuilder post(String uri)
public static ClassicRequestBuilder put()
public static ClassicRequestBuilder put(URI uri)
public static ClassicRequestBuilder put(String uri)
public static ClassicRequestBuilder delete()
public static ClassicRequestBuilder delete(URI uri)
public static ClassicRequestBuilder delete(String uri)
public static ClassicRequestBuilder trace()
public static ClassicRequestBuilder trace(URI uri)
public static ClassicRequestBuilder trace(String uri)
public static ClassicRequestBuilder options()
public static ClassicRequestBuilder options(URI uri)
public static ClassicRequestBuilder options(String uri)
public static ClassicRequestBuilder copy(ClassicHttpRequest request)
protected void digest(ClassicHttpRequest request)
public ClassicRequestBuilder setVersion(ProtocolVersion version)
setVersion
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder setUri(URI uri)
setUri
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder setUri(String uri)
setUri
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder setScheme(String scheme)
setScheme
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder setAuthority(URIAuthority authority)
setAuthority
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder setHttpHost(HttpHost httpHost)
setHttpHost
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder setPath(String path)
setPath
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder setHeaders(Header... headers)
setHeaders
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder addHeader(Header header)
addHeader
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder addHeader(String name, String value)
addHeader
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder removeHeader(Header header)
removeHeader
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder removeHeaders(String name)
removeHeaders
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder setHeader(Header header)
setHeader
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder setHeader(String name, String value)
setHeader
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder setCharset(Charset charset)
setCharset
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder addParameter(NameValuePair nvp)
addParameter
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder addParameter(String name, String value)
addParameter
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder addParameters(NameValuePair... nvps)
addParameters
in class AbstractRequestBuilder<ClassicHttpRequest>
public ClassicRequestBuilder setAbsoluteRequestUri(boolean absoluteRequestUri)
setAbsoluteRequestUri
in class AbstractRequestBuilder<ClassicHttpRequest>
public HttpEntity getEntity()
public ClassicRequestBuilder setEntity(HttpEntity entity)
public ClassicRequestBuilder setEntity(String content, ContentType contentType)
public ClassicRequestBuilder setEntity(String content)
public ClassicRequestBuilder setEntity(byte[] content, ContentType contentType)
public ClassicHttpRequest build()
build
in class AbstractMessageBuilder<ClassicHttpRequest>
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.