Search in sources :

Example 46 with Request

use of com.yahoo.application.container.handler.Request in project vespa by vespa-engine.

the class ApplicationRequestToDiscFilterRequestWrapper method getUpdatedRequest.

public Request getUpdatedRequest() {
    Request updatedRequest = new Request(this.request.getUri(), this.request.getBody(), this.request.getMethod(), this.userPrincipal);
    this.request.getHeaders().forEach(updatedRequest.getHeaders()::put);
    return updatedRequest;
}
Also used : ServletOrJdiscHttpRequest(com.yahoo.jdisc.http.servlet.ServletOrJdiscHttpRequest) DiscFilterRequest(com.yahoo.jdisc.http.filter.DiscFilterRequest) HttpRequest(com.yahoo.jdisc.http.HttpRequest) Request(com.yahoo.application.container.handler.Request)

Aggregations

Request (com.yahoo.application.container.handler.Request)46 Test (org.junit.Test)44 StringContains.containsString (org.hamcrest.core.StringContains.containsString)17 HttpGet (org.apache.http.client.methods.HttpGet)14 Response (com.yahoo.application.container.handler.Response)7 StringEntity (org.apache.http.entity.StringEntity)7 HttpPut (org.apache.http.client.methods.HttpPut)4 HttpPost (org.apache.http.client.methods.HttpPost)3 Application (com.yahoo.vespa.hosted.controller.Application)2 ContainerControllerTester (com.yahoo.vespa.hosted.controller.restapi.ContainerControllerTester)2 ControllerContainerTest (com.yahoo.vespa.hosted.controller.restapi.ControllerContainerTest)2 HttpResponse (org.apache.http.HttpResponse)2 HttpDelete (org.apache.http.client.methods.HttpDelete)2 MockHttpHandler (com.yahoo.application.container.handlers.MockHttpHandler)1 MockRenderer (com.yahoo.application.container.renderers.MockRenderer)1 Version (com.yahoo.component.Version)1 RequestHandler (com.yahoo.jdisc.handler.RequestHandler)1 HttpRequest (com.yahoo.jdisc.http.HttpRequest)1 DiscFilterRequest (com.yahoo.jdisc.http.filter.DiscFilterRequest)1 ServletOrJdiscHttpRequest (com.yahoo.jdisc.http.servlet.ServletOrJdiscHttpRequest)1