Package org.nuxeo.http.test
Class HttpClientTestRule.RequestBuilder
- java.lang.Object
-
- org.nuxeo.http.test.HttpClientTestRule.RequestBuilder
-
- Enclosing class:
- HttpClientTestRule
public class HttpClientTestRule.RequestBuilder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.http.client.methods.RequestBuilder
internalBuilder
protected Map<String,List<String>>
matrixParameters
protected Map<String,List<String>>
queryParameters
-
Constructor Summary
Constructors Modifier Constructor Description protected
RequestBuilder(String method, String url)
-
Method Summary
-
-
-
Method Detail
-
credentials
public HttpClientTestRule.RequestBuilder credentials(String username, String password)
-
accept
public HttpClientTestRule.RequestBuilder accept(String accept)
-
contentType
public HttpClientTestRule.RequestBuilder contentType(String contentType)
-
addHeader
public HttpClientTestRule.RequestBuilder addHeader(String name, String value)
-
addHeaders
public HttpClientTestRule.RequestBuilder addHeaders(Map<String,String> headers)
-
addQueryParameter
public HttpClientTestRule.RequestBuilder addQueryParameter(String name, String value)
-
addQueryParameter
public HttpClientTestRule.RequestBuilder addQueryParameter(String name, String value, String... values)
-
addQueryParameter
public HttpClientTestRule.RequestBuilder addQueryParameter(String name, String[] values)
-
addQueryParameter
public HttpClientTestRule.RequestBuilder addQueryParameter(String name, List<String> values)
-
addQueryParameters
public HttpClientTestRule.RequestBuilder addQueryParameters(Map<String,String> parameters)
-
addMatrixParameter
public HttpClientTestRule.RequestBuilder addMatrixParameter(String name, String value)
-
entity
public HttpClientTestRule.RequestBuilder entity(String entity)
-
entity
public HttpClientTestRule.RequestBuilder entity(Map<String,String> formData)
-
entity
public HttpClientTestRule.RequestBuilder entity(javax.ws.rs.core.MultivaluedMap<String,String> formData)
-
entity
public HttpClientTestRule.RequestBuilder entity(InputStream entity)
-
execute
public CloseableHttpResponse execute()
-
executeAndThen
public <R> R executeAndThen(Function<? super HttpResponse,R> finisher)
-
executeAndConsume
public void executeAndConsume(Consumer<? super HttpResponse> consumer)
-
execute
public <T> T execute(ResponseHandler<T> responseHandler)
-
executeAndThen
public <T,R> R executeAndThen(ResponseHandler<T> responseHandler, Function<T,R> finisher)
-
executeAndConsume
public <T> void executeAndConsume(ResponseHandler<T> responseHandler, Consumer<T> consumer)
-
-