RqBody - the type parameterpublic abstract class HttpUnitRqParams<RqBody> extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected Map<String,String> |
headers
The Headers.
|
protected String |
mediaType
The Media type.
|
protected String |
method
The Method.
|
protected RqBody |
requestBody |
protected String |
url
The Url.
|
| 构造器和说明 |
|---|
HttpUnitRqParams(String url)
Instantiates a new Http unit rq params.
|
| 限定符和类型 | 方法和说明 |
|---|---|
abstract HttpUnitRqParams |
getBody(String body)
Gets body.
|
abstract HttpUnitRqParams |
getBodyFrom(byte[] file)
Gets body from.
|
abstract HttpUnitRqParams |
getBodyFrom(File file)
Gets body from.
|
abstract HttpUnitRqParams |
getBodyFrom(com.alibaba.fastjson.JSONObject json)
Gets body from.
|
abstract HttpUnitRqParams |
getBodyFrom(Map<String,String> form)
Gets body from.
|
abstract HttpUnitRqParams |
getBodyFrom(Object json)
Gets body from.
|
abstract HttpUnitRqParams |
getBodyJSON(com.alibaba.fastjson.JSONObject json)
Gets body json.
|
abstract HttpUnitRqParams |
getBodyJSON(Map<String,Object> json)
Gets body json.
|
abstract HttpUnitRqParams |
getBodyJSON(Object json)
Gets body json.
|
String |
getMediaType()
Gets media type.
|
String |
getMethod()
Gets method.
|
RqBody |
getRequestBody() |
String |
getUrl()
Gets url.
|
void |
setMediaType(String mediaType)
Sets media type.
|
void |
setMethod(String method)
Sets method.
|
void |
setUrl(String url)
Sets url.
|
protected RqBody requestBody
protected String url
protected String method
protected String mediaType
public HttpUnitRqParams(String url)
url - the urlpublic String getUrl()
public void setUrl(String url)
url - the urlpublic String getMethod()
public void setMethod(String method)
method - the methodpublic String getMediaType()
public void setMediaType(String mediaType)
mediaType - the media typepublic abstract HttpUnitRqParams getBody(String body)
body - the bodypublic abstract HttpUnitRqParams getBodyJSON(Map<String,Object> json)
json - the jsonpublic abstract HttpUnitRqParams getBodyJSON(com.alibaba.fastjson.JSONObject json)
json - the jsonpublic abstract HttpUnitRqParams getBodyJSON(Object json)
json - the jsonpublic abstract HttpUnitRqParams getBodyFrom(Map<String,String> form)
form - the formpublic abstract HttpUnitRqParams getBodyFrom(com.alibaba.fastjson.JSONObject json)
json - the jsonpublic abstract HttpUnitRqParams getBodyFrom(Object json)
json - the jsonpublic abstract HttpUnitRqParams getBodyFrom(File file)
file - the filepublic abstract HttpUnitRqParams getBodyFrom(byte[] file)
file - the filepublic RqBody getRequestBody()
Copyright © 2021. All rights reserved.