public static class HttpUtils.HttpRequest extends Object implements Serializable
| 构造器和说明 |
|---|
HttpRequest() |
| 限定符和类型 | 方法和说明 |
|---|---|
HttpUtils.HttpRequest |
addHeaders(String key,
Object value) |
static HttpUtils.HttpRequest |
build(String url,
String method) |
static HttpUtils.HttpRequest |
get(String url) |
Object |
getBody() |
Map<String,String> |
getHeaders() |
Integer |
getMaxSocketTimeout() |
String |
getMethod() |
Function<org.apache.http.HttpEntity,Object> |
getResponseHandler() |
String |
getUrl() |
static HttpUtils.HttpRequest |
postFormData(String url) |
static HttpUtils.HttpRequest |
postJson(String url) |
HttpUtils.HttpRequest |
setBody(Object body) |
HttpUtils.HttpRequest |
setContentType(String contentType) |
HttpUtils.HttpRequest |
setHeaders(Map<String,String> headers) |
HttpUtils.HttpRequest |
setMaxSocketTimeout(Integer maxSocketTimeout) |
HttpUtils.HttpRequest |
setMethod(String method) |
HttpUtils.HttpRequest |
setResponseHandler(Function<org.apache.http.HttpEntity,Object> responseHandler) |
HttpUtils.HttpRequest |
setUrl(String url) |
public static HttpUtils.HttpRequest build(String url, String method)
public static HttpUtils.HttpRequest get(String url)
public static HttpUtils.HttpRequest postJson(String url)
public static HttpUtils.HttpRequest postFormData(String url)
public String getUrl()
public HttpUtils.HttpRequest setUrl(String url)
public String getMethod()
public HttpUtils.HttpRequest setMethod(String method)
public HttpUtils.HttpRequest setHeaders(Map<String,String> headers)
public HttpUtils.HttpRequest setContentType(String contentType)
public HttpUtils.HttpRequest addHeaders(String key, Object value)
public Object getBody()
public HttpUtils.HttpRequest setBody(Object body)
public HttpUtils.HttpRequest setMaxSocketTimeout(Integer maxSocketTimeout)
public Integer getMaxSocketTimeout()
public HttpUtils.HttpRequest setResponseHandler(Function<org.apache.http.HttpEntity,Object> responseHandler)
Copyright © 2022–2023. All rights reserved.