Package | Description |
---|---|
java.net.http |
High level HTTP and WebSocket API
|
Modifier and Type | Method and Description |
---|---|
static HttpRequest.BodyProcessor |
HttpRequest.fromByteArray(byte[] buf)
Returns a request processor whose body is the given byte array.
|
static HttpRequest.BodyProcessor |
HttpRequest.fromByteArray(byte[] buf,
int offset,
int length)
Returns a request processor whose body is the content of the given byte
array length bytes starting from the specified offset.
|
static HttpRequest.BodyProcessor |
HttpRequest.fromByteArrays(Iterator<byte[]> iter)
A request processor that takes data from an Iterator of byte arrays.
|
static HttpRequest.BodyProcessor |
HttpRequest.fromFile(Path path)
A request processor that takes data from the contents of a File.
|
static HttpRequest.BodyProcessor |
HttpRequest.fromInputStream(InputStream stream)
A request processor that reads its data from an InputStream.
|
static HttpRequest.BodyProcessor |
HttpRequest.fromString(String body)
Returns a request processor whose body is the given String, converted
using the
ISO_8859_1
character set. |
static HttpRequest.BodyProcessor |
HttpRequest.fromString(String s,
Charset charset)
Returns a request processor whose body is the given String, converted
using the given character set.
|
static HttpRequest.BodyProcessor |
HttpRequest.noBody()
A request processor which sends no request body.
|
Modifier and Type | Method and Description |
---|---|
abstract HttpRequest.Builder |
HttpRequest.Builder.body(HttpRequest.BodyProcessor reqproc)
Sets a request body for this builder.
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-ea+126