public class SimpleRequestBuilder extends org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
SimpleHttpRequest
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
setBody(SimpleBody)
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.
getAuthority, getCharset, getMethod, getParameters, getPath, getScheme, getUri, isAbsoluteRequestUri
public static SimpleRequestBuilder create(String method)
public static SimpleRequestBuilder create(org.apache.hc.core5.http.Method method)
public static SimpleRequestBuilder get()
public static SimpleRequestBuilder get(URI uri)
public static SimpleRequestBuilder get(String uri)
public static SimpleRequestBuilder head()
public static SimpleRequestBuilder head(URI uri)
public static SimpleRequestBuilder head(String uri)
public static SimpleRequestBuilder patch()
public static SimpleRequestBuilder patch(URI uri)
public static SimpleRequestBuilder patch(String uri)
public static SimpleRequestBuilder post()
public static SimpleRequestBuilder post(URI uri)
public static SimpleRequestBuilder post(String uri)
public static SimpleRequestBuilder put()
public static SimpleRequestBuilder put(URI uri)
public static SimpleRequestBuilder put(String uri)
public static SimpleRequestBuilder delete()
public static SimpleRequestBuilder delete(URI uri)
public static SimpleRequestBuilder delete(String uri)
public static SimpleRequestBuilder trace()
public static SimpleRequestBuilder trace(URI uri)
public static SimpleRequestBuilder trace(String uri)
public static SimpleRequestBuilder options()
public static SimpleRequestBuilder options(URI uri)
public static SimpleRequestBuilder options(String uri)
public static SimpleRequestBuilder copy(SimpleHttpRequest request)
public static SimpleRequestBuilder copy(org.apache.hc.core5.http.HttpRequest request)
protected void digest(SimpleHttpRequest request)
protected void digest(org.apache.hc.core5.http.HttpRequest request)
digest
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder setVersion(org.apache.hc.core5.http.ProtocolVersion version)
setVersion
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder setUri(URI uri)
setUri
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder setUri(String uri)
setUri
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder setScheme(String scheme)
setScheme
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder setAuthority(org.apache.hc.core5.net.URIAuthority authority)
setAuthority
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder setHttpHost(org.apache.hc.core5.http.HttpHost httpHost)
setHttpHost
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder setPath(String path)
setPath
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder setHeaders(org.apache.hc.core5.http.Header... headers)
setHeaders
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder addHeader(org.apache.hc.core5.http.Header header)
addHeader
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder addHeader(String name, String value)
addHeader
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder removeHeader(org.apache.hc.core5.http.Header header)
removeHeader
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder removeHeaders(String name)
removeHeaders
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder setHeader(org.apache.hc.core5.http.Header header)
setHeader
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder setHeader(String name, String value)
setHeader
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder setCharset(Charset charset)
setCharset
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder addParameter(org.apache.hc.core5.http.NameValuePair nvp)
addParameter
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder addParameter(String name, String value)
addParameter
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder addParameters(org.apache.hc.core5.http.NameValuePair... nvps)
addParameters
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleRequestBuilder setAbsoluteRequestUri(boolean absoluteRequestUri)
setAbsoluteRequestUri
in class org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
public SimpleBody getBody()
public SimpleRequestBuilder setBody(SimpleBody body)
public SimpleRequestBuilder setBody(String content, org.apache.hc.core5.http.ContentType contentType)
public SimpleRequestBuilder setBody(byte[] content, org.apache.hc.core5.http.ContentType contentType)
public RequestConfig getRequestConfig()
public SimpleRequestBuilder setRequestConfig(RequestConfig requestConfig)
public SimpleHttpRequest build()
build
in class org.apache.hc.core5.http.support.AbstractMessageBuilder<SimpleHttpRequest>
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.