public interface RequestBody
| Modifier and Type | Method and Description |
|---|---|
static RequestBody |
forBytes(String contentType,
byte[] bytes) |
static RequestBody |
forFile(File file) |
static RequestBody |
forFile(String contentType,
File file) |
static RequestBody |
forJson(String json) |
static RequestBody |
forJson(String json,
Charset charset) |
static RequestBody |
forMap(Map<String,String> body) |
static RequestBody |
forMap(Map<String,String> body,
Charset charset) |
static RequestBody |
forText(String text) |
static RequestBody |
forText(String text,
Charset charset) |
static RequestBody |
forText(String contentType,
String text,
Charset charset) |
default Optional<Integer> |
getContentLength() |
String |
getContentType() |
void |
write(OutputStream out) |
String getContentType()
void write(OutputStream out) throws IOException
IOExceptionstatic RequestBody forFile(String contentType, File file)
static RequestBody forFile(File file)
static RequestBody forBytes(String contentType, byte[] bytes)
static RequestBody forText(String contentType, String text, Charset charset)
static RequestBody forText(String text, Charset charset)
static RequestBody forText(String text)
static RequestBody forJson(String json, Charset charset)
static RequestBody forJson(String json)
static RequestBody forMap(Map<String,String> body, Charset charset)
static RequestBody forMap(Map<String,String> body)
Copyright © 2019. All rights reserved.