public final class SimpleHttpRequest extends ConfigurableHttpRequest
IMPORTANT: SimpleHttpRequests are intended for simple scenarios where entities inclosed
in requests are known to be small. It is generally recommended to use
AsyncRequestBuilder and streaming
AsyncEntityProducers.
SimpleBody,
AsyncRequestBuilder,
AsyncEntityProducer,
序列化表格| 构造器和说明 |
|---|
SimpleHttpRequest(Method method,
HttpHost host,
String path) |
SimpleHttpRequest(Method method,
URI requestUri) |
SimpleHttpRequest(String method,
HttpHost host,
String path) |
SimpleHttpRequest(String method,
String path) |
SimpleHttpRequest(String method,
String scheme,
URIAuthority authority,
String path) |
SimpleHttpRequest(String method,
URI requestUri) |
| 限定符和类型 | 方法和说明 |
|---|---|
static SimpleHttpRequest |
copy(HttpRequest original)
已过时。
|
static SimpleHttpRequest |
create(Method method,
HttpHost host,
String path) |
static SimpleHttpRequest |
create(Method method,
URI uri) |
static SimpleHttpRequest |
create(String method,
String uri) |
static SimpleHttpRequest |
create(String method,
String scheme,
URIAuthority authority,
String path) |
static SimpleHttpRequest |
create(String method,
URI uri) |
SimpleBody |
getBody() |
byte[] |
getBodyBytes() |
String |
getBodyText() |
ContentType |
getContentType() |
void |
setBody(byte[] bodyBytes,
ContentType contentType) |
void |
setBody(SimpleBody body) |
void |
setBody(String bodyText,
ContentType contentType) |
getConfig, setConfigaddHeader, getAuthority, getMethod, getPath, getRequestUri, getScheme, getUri, getVersion, setAbsoluteRequestUri, setAuthority, setHeader, setPath, setScheme, setUri, setVersion, toStringaddHeader, clear, containsHeader, countHeaders, getCondensedHeader, getFirstHeader, getHeader, getHeaders, getHeaders, getLastHeader, headerIterator, headerIterator, removeHeader, removeHeaders, removeHeaders, setHeader, setHeadersclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddHeader, removeHeader, removeHeaders, setHeader, setHeaderscontainsHeader, countHeaders, getFirstHeader, getHeader, getHeaders, getHeaders, getLastHeader, headerIterator, headerIteratorpublic SimpleHttpRequest(String method, String scheme, URIAuthority authority, String path)
public static SimpleHttpRequest create(String method, String uri)
public static SimpleHttpRequest create(String method, URI uri)
public static SimpleHttpRequest create(Method method, URI uri)
public static SimpleHttpRequest create(Method method, HttpHost host, String path)
public static SimpleHttpRequest create(String method, String scheme, URIAuthority authority, String path)
@Deprecated public static SimpleHttpRequest copy(HttpRequest original)
SimpleRequestBuilderpublic void setBody(SimpleBody body)
public void setBody(byte[] bodyBytes,
ContentType contentType)
public void setBody(String bodyText, ContentType contentType)
public SimpleBody getBody()
public ContentType getContentType()
public String getBodyText()
public byte[] getBodyBytes()
Copyright © 2023. All rights reserved.