public class RequestBuilder extends Object
Constructor and Description |
---|
RequestBuilder(String baseUrl) |
Modifier and Type | Method and Description |
---|---|
Request |
buildGetRequest(String path,
String... queryParameters)
Build a GET request to specified path with optional query
parameters.
|
Request |
buildOtherRequest(org.apache.http.client.methods.HttpRequestBase r)
Wrap supplied HTTP request
|
Request |
buildPostRequest(String path)
Build a POST request to specified path with optional query
parameters.
|
String |
buildUrl(String path,
String... queryParameters)
Build an URL from our base path, supplied path and optional
query parameters.
|
public RequestBuilder(String baseUrl)
public Request buildGetRequest(String path, String... queryParameters)
buildUrl(String, String...)
for
queryParameters semantics.public Request buildPostRequest(String path)
buildUrl(String, String...)
for
queryParameters semantics.public Request buildOtherRequest(org.apache.http.client.methods.HttpRequestBase r)
public String buildUrl(String path, String... queryParameters)
queryParameters
- an even number of Strings, each pair
of values represents the key and value of a query parameter.
Keys and values are encoded by this method.Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.