public class Request extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DATE_FORMAT
Deprecated.
This attribute is no longer supported as a part of the public API.
|
static Locale |
DATE_LOCALE
Deprecated.
This attribute is no longer supported as a part of the public API.
|
static TimeZone |
TIME_ZONE
Deprecated.
This attribute is no longer supported as a part of the public API.
|
Modifier and Type | Method and Description |
---|---|
Request |
addHeader(org.apache.hc.core5.http.Header header) |
Request |
addHeader(String name,
String value) |
Request |
body(org.apache.hc.core5.http.HttpEntity entity) |
Request |
bodyByteArray(byte[] b) |
Request |
bodyByteArray(byte[] b,
org.apache.hc.core5.http.ContentType contentType) |
Request |
bodyByteArray(byte[] b,
int off,
int len) |
Request |
bodyByteArray(byte[] b,
int off,
int len,
org.apache.hc.core5.http.ContentType contentType) |
Request |
bodyFile(File file,
org.apache.hc.core5.http.ContentType contentType) |
Request |
bodyForm(Iterable<? extends org.apache.hc.core5.http.NameValuePair> formParams) |
Request |
bodyForm(Iterable<? extends org.apache.hc.core5.http.NameValuePair> formParams,
Charset charset) |
Request |
bodyForm(org.apache.hc.core5.http.NameValuePair... formParams) |
Request |
bodyStream(InputStream inStream) |
Request |
bodyStream(InputStream inStream,
org.apache.hc.core5.http.ContentType contentType) |
Request |
bodyString(String s,
org.apache.hc.core5.http.ContentType contentType) |
Request |
connectTimeout(org.apache.hc.core5.util.Timeout timeout) |
static Request |
create(org.apache.hc.core5.http.Method method,
URI uri) |
static Request |
create(String methodName,
String uri) |
static Request |
create(String methodName,
URI uri) |
static Request |
delete(String uri) |
static Request |
delete(URI uri) |
Response |
execute() |
Response |
execute(CloseableHttpClient client) |
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 |
removeHeader(org.apache.hc.core5.http.Header header) |
Request |
removeHeaders(String name) |
Request |
responseTimeout(org.apache.hc.core5.util.Timeout timeout) |
Request |
setCacheControl(String cacheControl) |
Request |
setDate(Date date)
Deprecated.
Use
setDate(Instant) |
Request |
setDate(Instant instant) |
Request |
setHeader(org.apache.hc.core5.http.Header header) |
Request |
setHeader(String name,
String value) |
Request |
setHeaders(org.apache.hc.core5.http.Header... headers) |
Request |
setIfModifiedSince(Date date)
Deprecated.
|
Request |
setIfModifiedSince(Instant instant) |
Request |
setIfUnmodifiedSince(Date date)
Deprecated.
|
Request |
setIfUnmodifiedSince(Instant instant) |
String |
toString() |
static Request |
trace(String uri) |
static Request |
trace(URI uri) |
Request |
useExpectContinue() |
Request |
userAgent(String agent) |
Request |
version(org.apache.hc.core5.http.HttpVersion version) |
Request |
viaProxy(org.apache.hc.core5.http.HttpHost proxy) |
Request |
viaProxy(String proxy) |
@Deprecated public static final String DATE_FORMAT
@Deprecated public static final Locale DATE_LOCALE
@Deprecated public static final TimeZone TIME_ZONE
public Response execute() throws IOException
IOException
public Response execute(CloseableHttpClient client) throws IOException
IOException
public Request addHeader(org.apache.hc.core5.http.Header header)
public Request setHeader(org.apache.hc.core5.http.Header header)
public Request removeHeader(org.apache.hc.core5.http.Header header)
public Request setHeaders(org.apache.hc.core5.http.Header... headers)
@Deprecated public Request setDate(Date date)
setDate(Instant)
@Deprecated public Request setIfModifiedSince(Date date)
setIfModifiedSince(Instant)
@Deprecated public Request setIfUnmodifiedSince(Date date)
setIfUnmodifiedSince(Instant)
public Request version(org.apache.hc.core5.http.HttpVersion version)
public Request useExpectContinue()
public Request connectTimeout(org.apache.hc.core5.util.Timeout timeout)
public Request responseTimeout(org.apache.hc.core5.util.Timeout timeout)
public Request viaProxy(org.apache.hc.core5.http.HttpHost proxy)
public Request body(org.apache.hc.core5.http.HttpEntity entity)
public Request bodyForm(Iterable<? extends org.apache.hc.core5.http.NameValuePair> formParams, Charset charset)
public Request bodyForm(Iterable<? extends org.apache.hc.core5.http.NameValuePair> formParams)
public Request bodyForm(org.apache.hc.core5.http.NameValuePair... formParams)
public Request bodyByteArray(byte[] b)
public Request bodyByteArray(byte[] b, org.apache.hc.core5.http.ContentType contentType)
public Request bodyByteArray(byte[] b, int off, int len)
public Request bodyByteArray(byte[] b, int off, int len, org.apache.hc.core5.http.ContentType contentType)
public Request bodyStream(InputStream inStream)
public Request bodyStream(InputStream inStream, org.apache.hc.core5.http.ContentType contentType)
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.