public class Request extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DATE_FORMAT |
static Locale |
DATE_LOCALE |
static TimeZone |
TIME_ZONE |
Modifier and Type | Method and Description |
---|---|
void |
abort() |
Request |
addHeader(org.apache.http.Header header) |
Request |
addHeader(String name,
String value) |
Request |
body(org.apache.http.HttpEntity entity) |
Request |
bodyByteArray(byte[] b) |
Request |
bodyByteArray(byte[] b,
org.apache.http.entity.ContentType contentType) |
Request |
bodyByteArray(byte[] b,
int off,
int len) |
Request |
bodyByteArray(byte[] b,
int off,
int len,
org.apache.http.entity.ContentType contentType) |
Request |
bodyFile(File file,
org.apache.http.entity.ContentType contentType) |
Request |
bodyForm(Iterable<? extends org.apache.http.NameValuePair> formParams) |
Request |
bodyForm(Iterable<? extends org.apache.http.NameValuePair> formParams,
Charset charset) |
Request |
bodyForm(org.apache.http.NameValuePair... formParams) |
Request |
bodyStream(InputStream inStream) |
Request |
bodyStream(InputStream inStream,
org.apache.http.entity.ContentType contentType) |
Request |
bodyString(String s,
org.apache.http.entity.ContentType contentType) |
Request |
config(String param,
Object object)
Deprecated.
(4.3)
|
Request |
connectTimeout(int timeout) |
static Request |
Delete(String uri) |
static Request |
Delete(URI uri) |
Request |
elementCharset(String charset)
Deprecated.
(4.3)
|
Response |
execute() |
static Request |
Get(String uri) |
static Request |
Get(URI uri) |
static Request |
Head(String uri) |
static Request |
Head(URI uri) |
static Request |
Options(String uri) |
static Request |
Options(URI uri) |
static Request |
Patch(String uri) |
static Request |
Patch(URI uri) |
static Request |
Post(String uri) |
static Request |
Post(URI uri) |
static Request |
Put(String uri) |
static Request |
Put(URI uri) |
Request |
removeConfig(String param)
Deprecated.
(4.3)
|
Request |
removeHeader(org.apache.http.Header header) |
Request |
removeHeaders(String name) |
Request |
setCacheControl(String cacheControl) |
Request |
setDate(Date date) |
Request |
setHeader(org.apache.http.Header header) |
Request |
setHeader(String name,
String value) |
Request |
setHeaders(org.apache.http.Header... headers) |
Request |
setIfModifiedSince(Date date) |
Request |
setIfUnmodifiedSince(Date date) |
Request |
socketTimeout(int timeout) |
Request |
staleConnectionCheck(boolean b)
Deprecated.
(4.4)
|
String |
toString() |
static Request |
Trace(String uri) |
static Request |
Trace(URI uri) |
Request |
useExpectContinue() |
Request |
userAgent(String agent) |
Request |
version(org.apache.http.HttpVersion version) |
Request |
viaProxy(org.apache.http.HttpHost proxy) |
Request |
viaProxy(String proxy) |
public static final String DATE_FORMAT
public static final Locale DATE_LOCALE
public static final TimeZone TIME_ZONE
public Response execute() throws ClientProtocolException, IOException
ClientProtocolException
IOException
public void abort() throws UnsupportedOperationException
UnsupportedOperationException
public Request addHeader(org.apache.http.Header header)
public Request setHeader(org.apache.http.Header header)
public Request removeHeader(org.apache.http.Header header)
public Request setHeaders(org.apache.http.Header... headers)
@Deprecated public Request config(String param, Object object)
@Deprecated public Request removeConfig(String param)
public Request version(org.apache.http.HttpVersion version)
@Deprecated public Request elementCharset(String charset)
This method has no effect. Do not use.
public Request useExpectContinue()
public Request socketTimeout(int timeout)
public Request connectTimeout(int timeout)
@Deprecated public Request staleConnectionCheck(boolean b)
public Request viaProxy(org.apache.http.HttpHost proxy)
public Request body(org.apache.http.HttpEntity entity)
public Request bodyForm(Iterable<? extends org.apache.http.NameValuePair> formParams, Charset charset)
public Request bodyForm(org.apache.http.NameValuePair... formParams)
public Request bodyByteArray(byte[] b)
public Request bodyByteArray(byte[] b, org.apache.http.entity.ContentType contentType)
public Request bodyByteArray(byte[] b, int off, int len)
public Request bodyByteArray(byte[] b, int off, int len, org.apache.http.entity.ContentType contentType)
public Request bodyStream(InputStream inStream)
public Request bodyStream(InputStream inStream, org.apache.http.entity.ContentType contentType)
Copyright © 1999–2022 The Apache Software Foundation. All rights reserved.