public class HttpRequestBody extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
HttpRequestBody.ContentType |
Constructor and Description |
---|
HttpRequestBody() |
HttpRequestBody(byte[] body,
String contentType,
String encoding) |
Modifier and Type | Method and Description |
---|---|
static HttpRequestBody |
custom(byte[] body,
String contentType,
String encoding) |
static HttpRequestBody |
form(Map<String,Object> params,
String encoding) |
byte[] |
getBody() |
String |
getContentType() |
String |
getEncoding() |
static HttpRequestBody |
json(String json,
String encoding) |
void |
setBody(byte[] body) |
void |
setContentType(String contentType) |
void |
setEncoding(String encoding) |
static HttpRequestBody |
xml(String xml,
String encoding) |
public String getContentType()
public String getEncoding()
public void setBody(byte[] body)
public void setContentType(String contentType)
public void setEncoding(String encoding)
public static HttpRequestBody json(String json, String encoding)
public static HttpRequestBody xml(String xml, String encoding)
public static HttpRequestBody custom(byte[] body, String contentType, String encoding)
public static HttpRequestBody form(Map<String,Object> params, String encoding)
public byte[] getBody()
Copyright © 2017. All rights reserved.