Package org.apache.http.client.methods
Class RequestBuilder
java.lang.Object
org.apache.http.client.methods.RequestBuilder
Builder for
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
.
- Since:
- 4.3
-
Method Summary
Modifier and TypeMethodDescriptionaddHeader
(org.apache.http.Header header) addParameter
(String name, String value) addParameter
(org.apache.http.NameValuePair nvp) addParameters
(org.apache.http.NameValuePair... nvps) build()
static RequestBuilder
copy
(org.apache.http.HttpRequest request) static RequestBuilder
static RequestBuilder
delete()
static RequestBuilder
static RequestBuilder
static RequestBuilder
get()
static RequestBuilder
static RequestBuilder
org.apache.http.HttpEntity
org.apache.http.Header
getFirstHeader
(String name) org.apache.http.Header[]
getHeaders
(String name) org.apache.http.Header
getLastHeader
(String name) List
<org.apache.http.NameValuePair> getUri()
org.apache.http.ProtocolVersion
static RequestBuilder
head()
static RequestBuilder
static RequestBuilder
static RequestBuilder
options()
static RequestBuilder
static RequestBuilder
static RequestBuilder
patch()
static RequestBuilder
static RequestBuilder
static RequestBuilder
post()
static RequestBuilder
static RequestBuilder
static RequestBuilder
put()
static RequestBuilder
static RequestBuilder
removeHeader
(org.apache.http.Header header) removeHeaders
(String name) setCharset
(Charset charset) setConfig
(RequestConfig config) setEntity
(org.apache.http.HttpEntity entity) setHeader
(org.apache.http.Header header) setVersion
(org.apache.http.ProtocolVersion version) toString()
static RequestBuilder
trace()
static RequestBuilder
static RequestBuilder
-
Method Details
-
create
-
get
-
get
- Since:
- 4.4
-
get
- Since:
- 4.4
-
head
-
head
- Since:
- 4.4
-
head
- Since:
- 4.4
-
patch
- Since:
- 4.4
-
patch
- Since:
- 4.4
-
patch
- Since:
- 4.4
-
post
-
post
- Since:
- 4.4
-
post
- Since:
- 4.4
-
put
-
put
- Since:
- 4.4
-
put
- Since:
- 4.4
-
delete
-
delete
- Since:
- 4.4
-
delete
- Since:
- 4.4
-
trace
-
trace
- Since:
- 4.4
-
trace
- Since:
- 4.4
-
options
-
options
- Since:
- 4.4
-
options
- Since:
- 4.4
-
copy
-
setCharset
- Since:
- 4.4
-
getCharset
- Since:
- 4.4
-
getMethod
-
getVersion
public org.apache.http.ProtocolVersion getVersion() -
setVersion
-
getUri
-
setUri
-
setUri
-
getFirstHeader
-
getLastHeader
-
getHeaders
-
addHeader
-
addHeader
-
removeHeader
-
removeHeaders
-
setHeader
-
setHeader
-
getEntity
public org.apache.http.HttpEntity getEntity() -
setEntity
-
getParameters
-
addParameter
-
addParameter
-
addParameters
-
getConfig
-
setConfig
-
build
-
toString
-