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,
Serialized Form| Constructor and Description |
|---|
SimpleHttpRequest(org.apache.hc.core5.http.Method method,
org.apache.hc.core5.http.HttpHost host,
String path) |
SimpleHttpRequest(org.apache.hc.core5.http.Method method,
URI requestUri) |
SimpleHttpRequest(String method,
org.apache.hc.core5.http.HttpHost host,
String path) |
SimpleHttpRequest(String method,
String path) |
SimpleHttpRequest(String method,
String scheme,
org.apache.hc.core5.net.URIAuthority authority,
String path) |
SimpleHttpRequest(String method,
URI requestUri) |
| Modifier and Type | Method and Description |
|---|---|
static SimpleHttpRequest |
copy(org.apache.hc.core5.http.HttpRequest original)
Deprecated.
|
static SimpleHttpRequest |
create(org.apache.hc.core5.http.Method method,
org.apache.hc.core5.http.HttpHost host,
String path) |
static SimpleHttpRequest |
create(org.apache.hc.core5.http.Method method,
URI uri) |
static SimpleHttpRequest |
create(String method,
String uri) |
static SimpleHttpRequest |
create(String method,
String scheme,
org.apache.hc.core5.net.URIAuthority authority,
String path) |
static SimpleHttpRequest |
create(String method,
URI uri) |
SimpleBody |
getBody() |
byte[] |
getBodyBytes() |
String |
getBodyText() |
org.apache.hc.core5.http.ContentType |
getContentType() |
void |
setBody(byte[] bodyBytes,
org.apache.hc.core5.http.ContentType contentType) |
void |
setBody(SimpleBody body) |
void |
setBody(String bodyText,
org.apache.hc.core5.http.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, waitpublic SimpleHttpRequest(String method, org.apache.hc.core5.http.HttpHost host, String path)
public SimpleHttpRequest(org.apache.hc.core5.http.Method method,
URI requestUri)
public SimpleHttpRequest(org.apache.hc.core5.http.Method method,
org.apache.hc.core5.http.HttpHost host,
String path)
public static SimpleHttpRequest create(String method, String uri)
public static SimpleHttpRequest create(String method, URI uri)
public static SimpleHttpRequest create(org.apache.hc.core5.http.Method method, URI uri)
public static SimpleHttpRequest create(org.apache.hc.core5.http.Method method, org.apache.hc.core5.http.HttpHost host, String path)
public static SimpleHttpRequest create(String method, String scheme, org.apache.hc.core5.net.URIAuthority authority, String path)
@Deprecated public static SimpleHttpRequest copy(org.apache.hc.core5.http.HttpRequest original)
SimpleRequestBuilderpublic void setBody(SimpleBody body)
public void setBody(byte[] bodyBytes,
org.apache.hc.core5.http.ContentType contentType)
public void setBody(String bodyText, org.apache.hc.core5.http.ContentType contentType)
public SimpleBody getBody()
public org.apache.hc.core5.http.ContentType getContentType()
public String getBodyText()
public byte[] getBodyBytes()
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.