Search in sources :

Example 11 with RequestBuilder

use of org.apache.http.client.methods.RequestBuilder in project asterixdb by apache.

the class HttpServerTest method request.

protected HttpUriRequest request(String query) throws URISyntaxException {
    URI uri = new URI(PROTOCOL, null, HOST, PORT, PATH, query, null);
    RequestBuilder builder = RequestBuilder.get(uri);
    builder.setCharset(StandardCharsets.UTF_8);
    return builder.build();
}
Also used : RequestBuilder(org.apache.http.client.methods.RequestBuilder) URI(java.net.URI)

Aggregations

RequestBuilder (org.apache.http.client.methods.RequestBuilder)11 CompilationUnit (org.apache.asterix.testframework.xml.TestCase.CompilationUnit)4 StringEntity (org.apache.http.entity.StringEntity)4 RequestConfig (org.apache.http.client.config.RequestConfig)3 URI (java.net.URI)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 HttpServer (com.github.dreamhead.moco.HttpServer)1 Runnable (com.github.dreamhead.moco.Runnable)1 IOException (java.io.IOException)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 HttpEntity (org.apache.http.HttpEntity)1 NameValuePair (org.apache.http.NameValuePair)1 URIBuilder (org.apache.http.client.utils.URIBuilder)1 ByteArrayEntity (org.apache.http.entity.ByteArrayEntity)1 ContentType (org.apache.http.entity.ContentType)1