public static final class HttpClient.BodySuppliers extends Object
| Modifier and Type | Method and Description |
|---|---|
static IOSupplier<? extends InputStream> |
ofBytes(byte[] body)
Creates a body supplier of the provided byte array.
|
static IOSupplier<? extends InputStream> |
ofString(String body)
Creates a body supplier of the provided string.
|
static IOSupplier<? extends InputStream> |
ofString(String body,
Charset charset)
Creates a body supplier of the provided string and charset.
|
public static IOSupplier<? extends InputStream> ofString(String body)
body - the string bodypublic static IOSupplier<? extends InputStream> ofString(String body, Charset charset)
body - the string bodycharset - the charset to usepublic static IOSupplier<? extends InputStream> ofBytes(byte[] body)
body - the byte arrayCopyright © 2023. All rights reserved.