Search in sources :

Example 1 with HttpRequestBuilder

use of com.netflix.zuul.message.util.HttpRequestBuilder in project zuul by Netflix.

the class DebugTest method setup.

@Before
public void setup() {
    ctx = new SessionContext();
    headers = new Headers();
    headers.add("lah", "deda");
    params = new HttpQueryParams();
    params.add("k1", "v1");
    request = new HttpRequestBuilder(ctx).withMethod(HttpMethod.POST).withUri("/some/where").withHeaders(headers).withQueryParams(params).build();
    request.setBodyAsText("some text");
    request.storeInboundRequest();
    response = new HttpResponseMessageImpl(ctx, headers, request, 200);
    response.setBodyAsText("response text");
}
Also used : Headers(com.netflix.zuul.message.Headers) HttpQueryParams(com.netflix.zuul.message.http.HttpQueryParams) HttpResponseMessageImpl(com.netflix.zuul.message.http.HttpResponseMessageImpl) HttpRequestBuilder(com.netflix.zuul.message.util.HttpRequestBuilder) Before(org.junit.Before)

Aggregations

Headers (com.netflix.zuul.message.Headers)1 HttpQueryParams (com.netflix.zuul.message.http.HttpQueryParams)1 HttpResponseMessageImpl (com.netflix.zuul.message.http.HttpResponseMessageImpl)1 HttpRequestBuilder (com.netflix.zuul.message.util.HttpRequestBuilder)1 Before (org.junit.Before)1