Search in sources :

Example 1 with RestMethod

use of com.linkedin.r2.message.rest.RestMethod in project rest.li by linkedin.

the class TestGreetingUnstructuredDataResourcesReactive method sentRequest.

private RestResponse sentRequest(String getPartialUrl, ByteString entity, String restMethod) throws Throwable {
    Client client = getR2Client();
    URI uri = URI.create("http://localhost:" + FILTERS_PORT + getPartialUrl);
    RestRequest r = new RestRequestBuilder(uri).setEntity(entity).setMethod(restMethod).build();
    return client.restRequest(r).get();
}
Also used : RestRequest(com.linkedin.r2.message.rest.RestRequest) RestRequestBuilder(com.linkedin.r2.message.rest.RestRequestBuilder) Client(com.linkedin.r2.transport.common.Client) URI(java.net.URI)

Aggregations

RestRequest (com.linkedin.r2.message.rest.RestRequest)1 RestRequestBuilder (com.linkedin.r2.message.rest.RestRequestBuilder)1 Client (com.linkedin.r2.transport.common.Client)1 URI (java.net.URI)1