T
- public abstract class HttpRequestBuilder<T extends HttpRequestBuilder<T>> extends Object implements Executable<Request>, HttpRequestBuilderInterface<T>
Modifier and Type | Field and Description |
---|---|
protected List<BodyElement> |
bodyElements |
protected Charset |
charset |
protected Map<String,Cookie> |
cookies |
protected Map<String,Header> |
headers |
protected MethodMode |
methodMode |
protected Map<String,Parameter> |
parameters |
protected String |
url |
Constructor and Description |
---|
HttpRequestBuilder(MethodMode methodMode,
String url) |
Modifier and Type | Method and Description |
---|---|
T |
charset(Charset charset)
设置请求编码
|
T |
charset(String charset)
设置请求编码
|
T |
cookie(Cookie cookie)
增加单个cookie
|
T |
cookie(String domain,
String name,
String value)
增加单个cookie
|
T |
cookies(Map<String,Cookie> cookies)
批量增加cookie
|
T |
header(String name,
String value)
增加单条HTTP报文首部参数
|
T |
headers(Map<String,String> maps)
批量增加HTTP报文首部参数
|
T |
param(String name,
Object value)
增加单条URL参数
|
T |
params(Map<String,Object> maps)
批量增加URL参数
|
protected abstract T |
self() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute
protected final MethodMode methodMode
protected final String url
protected List<BodyElement> bodyElements
protected Charset charset
public HttpRequestBuilder(MethodMode methodMode, String url)
public T charset(String charset)
HttpRequestBuilderInterface
charset
in interface HttpRequestBuilderInterface<T extends HttpRequestBuilder<T>>
public T charset(Charset charset)
HttpRequestBuilderInterface
charset
in interface HttpRequestBuilderInterface<T extends HttpRequestBuilder<T>>
public T param(String name, Object value)
HttpRequestBuilderInterface
param
in interface HttpRequestBuilderInterface<T extends HttpRequestBuilder<T>>
public T params(Map<String,Object> maps)
HttpRequestBuilderInterface
params
in interface HttpRequestBuilderInterface<T extends HttpRequestBuilder<T>>
public T header(String name, String value)
HttpRequestBuilderInterface
header
in interface HttpRequestBuilderInterface<T extends HttpRequestBuilder<T>>
public T headers(Map<String,String> maps)
HttpRequestBuilderInterface
headers
in interface HttpRequestBuilderInterface<T extends HttpRequestBuilder<T>>
public T cookie(String domain, String name, String value)
HttpRequestBuilderInterface
cookie
in interface HttpRequestBuilderInterface<T extends HttpRequestBuilder<T>>
public T cookie(Cookie cookie)
HttpRequestBuilderInterface
cookie
in interface HttpRequestBuilderInterface<T extends HttpRequestBuilder<T>>
public T cookies(Map<String,Cookie> cookies)
HttpRequestBuilderInterface
cookies
in interface HttpRequestBuilderInterface<T extends HttpRequestBuilder<T>>
protected abstract T self()
Copyright © 2006–2018 TinyGroup. All rights reserved.