添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
public class SimpleRequestBuilder
extends org.apache.hc.core5.http.support.AbstractRequestBuilder<SimpleHttpRequest>
Builder for 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.
Since:
SimpleRequestBuilder setBody (byte[] content, org.apache.hc.core5.http.ContentType contentType) SimpleRequestBuilder setBody ( SimpleBody body) SimpleRequestBuilder setBody ( String content, org.apache.hc.core5.http.ContentType contentType) SimpleRequestBuilder setCharset ( Charset charset) SimpleRequestBuilder setHeader (org.apache.hc.core5.http.Header header) SimpleRequestBuilder setHeader ( String name, String value) SimpleRequestBuilder setHeaders (org.apache.hc.core5.http.Header... headers) SimpleRequestBuilder setHttpHost (org.apache.hc.core5.http.HttpHost httpHost) SimpleRequestBuilder setPath ( String path) SimpleRequestBuilder setRequestConfig ( RequestConfig requestConfig) SimpleRequestBuilder setScheme ( String scheme) SimpleRequestBuilder setUri ( String uri) SimpleRequestBuilder setUri ( URI uri) SimpleRequestBuilder setVersion (org.apache.hc.core5.http.ProtocolVersion version) String toString () static SimpleRequestBuilder trace () static SimpleRequestBuilder trace ( String uri) static SimpleRequestBuilder trace ( URI uri)
public static SimpleRequestBuilder copy(org.apache.hc.core5.http.HttpRequest request)
Since:

setVersion

public SimpleRequestBuilder setVersion(org.apache.hc.core5.http.ProtocolVersion version)
Overrides:
setVersion in class org.apache.hc.core5.http.support.AbstractRequestBuilder< SimpleHttpRequest >

setAuthority

public SimpleRequestBuilder setAuthority(org.apache.hc.core5.net.URIAuthority authority)
Overrides:
setAuthority in class org.apache.hc.core5.http.support.AbstractRequestBuilder< SimpleHttpRequest >

setHttpHost

public SimpleRequestBuilder setHttpHost(org.apache.hc.core5.http.HttpHost httpHost)
Overrides:
setHttpHost in class org.apache.hc.core5.http.support.AbstractRequestBuilder< SimpleHttpRequest >

setHeaders

public SimpleRequestBuilder setHeaders(org.apache.hc.core5.http.Header... headers)
Overrides:
setHeaders in class org.apache.hc.core5.http.support.AbstractRequestBuilder< SimpleHttpRequest >
public SimpleRequestBuilder addHeader(org.apache.hc.core5.http.Header header)
Overrides:
addHeader in class org.apache.hc.core5.http.support.AbstractRequestBuilder< SimpleHttpRequest >

removeHeader

public SimpleRequestBuilder removeHeader(org.apache.hc.core5.http.Header header)
Overrides:
removeHeader in class org.apache.hc.core5.http.support.AbstractRequestBuilder< SimpleHttpRequest >
public SimpleRequestBuilder setHeader(org.apache.hc.core5.http.Header header)
Overrides:
setHeader in class org.apache.hc.core5.http.support.AbstractRequestBuilder< SimpleHttpRequest >

addParameter

public SimpleRequestBuilder addParameter(org.apache.hc.core5.http.NameValuePair nvp)
Overrides:
addParameter in class org.apache.hc.core5.http.support.AbstractRequestBuilder< SimpleHttpRequest >

addParameters

public SimpleRequestBuilder addParameters(org.apache.hc.core5.http.NameValuePair... nvps)
Overrides:
addParameters in class org.apache.hc.core5.http.support.AbstractRequestBuilder< SimpleHttpRequest >

setAbsoluteRequestUri

public SimpleRequestBuilder setAbsoluteRequestUri(boolean absoluteRequestUri)
Overrides:
setAbsoluteRequestUri in class org.apache.hc.core5.http.support.AbstractRequestBuilder< SimpleHttpRequest >