Package de.galan.commons.net.flux
Class FluentHttpClient.HttpBuilder
- java.lang.Object
-
- de.galan.commons.net.flux.FluentHttpClient.HttpBuilder
-
- Enclosing class:
- FluentHttpClient
public static class FluentHttpClient.HttpBuilder extends Object
Builder
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHttpBuilder(HttpClient client, String resource)
-
Method Summary
-
-
-
Constructor Detail
-
HttpBuilder
protected HttpBuilder(HttpClient client, String resource)
-
-
Method Detail
-
proxy
public FluentHttpClient.HttpBuilder proxy(String proxy)
-
proxy
public FluentHttpClient.HttpBuilder proxy(CommonProxy proxy)
-
proxy
public FluentHttpClient.HttpBuilder proxy(String ip, int port)
-
proxyAuthentication
public FluentHttpClient.HttpBuilder proxyAuthentication(String username, String password)
Has to be called after setting a proxy via ip/port
-
authentication
public FluentHttpClient.HttpBuilder authentication(String username, String password)
-
timeout
public FluentHttpClient.HttpBuilder timeout(String timeout)
-
timeout
public FluentHttpClient.HttpBuilder timeout(Integer timeout)
-
timeout
public FluentHttpClient.HttpBuilder timeout(Long timeout)
-
timeoutConnection
public FluentHttpClient.HttpBuilder timeoutConnection(String timeoutConnection)
-
timeoutConnection
public FluentHttpClient.HttpBuilder timeoutConnection(Integer timeoutConnection)
-
timeoutConnection
public FluentHttpClient.HttpBuilder timeoutConnection(Long timeoutConnection)
-
timeoutRead
public FluentHttpClient.HttpBuilder timeoutRead(String timeoutRead)
-
timeoutRead
public FluentHttpClient.HttpBuilder timeoutRead(Integer timeoutRead)
-
timeoutRead
public FluentHttpClient.HttpBuilder timeoutRead(Long timeoutRead)
-
followRedirects
public FluentHttpClient.HttpBuilder followRedirects()
-
unfollowRedirects
public FluentHttpClient.HttpBuilder unfollowRedirects()
-
retries
public FluentHttpClient.HttpBuilder retries(Long retries, String timeBetween)
-
timeoutThread
public FluentHttpClient.HttpBuilder timeoutThread()
-
body
public FluentHttpClient.HttpBuilder body(String body)
-
body
public FluentHttpClient.HttpBuilder body(String body, Charset charset)
-
body
public FluentHttpClient.HttpBuilder body(byte[] body)
-
header
public FluentHttpClient.HttpBuilder header(String key, String value)
-
headers
public FluentHttpClient.HttpBuilder headers(Map<String,String> headers)
-
parameter
public FluentHttpClient.HttpBuilder parameter(String key, String... values)
-
param
public FluentHttpClient.HttpBuilder param(String key, String... values)
-
parameterMap
public FluentHttpClient.HttpBuilder parameterMap(Map<String,String> parameters)
-
parameterList
public FluentHttpClient.HttpBuilder parameterList(Map<String,List<String>> parameters)
-
get
public Response get() throws HttpClientException
- Throws:
HttpClientException
-
put
public Response put() throws HttpClientException
- Throws:
HttpClientException
-
post
public Response post() throws HttpClientException
- Throws:
HttpClientException
-
delete
public Response delete() throws HttpClientException
- Throws:
HttpClientException
-
head
public Response head() throws HttpClientException
- Throws:
HttpClientException
-
trace
public Response trace() throws HttpClientException
- Throws:
HttpClientException
-
options
public Response options() throws HttpClientException
- Throws:
HttpClientException
-
method
public Response method(Method method) throws HttpClientException
- Throws:
HttpClientException
-
toUrlString
public String toUrlString()
Return the URL the builder would generate as String, does not include header, etc.
-
-