public class NameValueRequestBody extends ForestRequestBody
该请求体对象会包装键值对的名称和值, 会根据请求的ContentType转换成表单项或JSON中的一个字段
ForestRequestBody.BodyType
type
Constructor and Description |
---|
NameValueRequestBody(String name,
Object value) |
NameValueRequestBody(String name,
String contentType,
Object value) |
Modifier and Type | Method and Description |
---|---|
String |
getContentType() |
String |
getName() |
Object |
getValue() |
void |
setContentType(String contentType) |
void |
setName(String name) |
void |
setValue(Object value) |
String |
toFormString() |
String |
toString() |
getType
public String getName()
public void setName(String name)
public Object getValue()
public void setValue(Object value)
public String getContentType()
public void setContentType(String contentType)
public String toFormString()
Copyright © 2020. All rights reserved.