Search in sources :

Example 1 with EmptyBody

use of com.predic8.membrane.core.http.EmptyBody in project service-proxy by membrane.

the class MethodOverrideInterceptor method handleGet.

private void handleGet(Exchange exc) throws IOException {
    Request req = exc.getRequest();
    req.readBody();
    req.setBody(new EmptyBody());
    req.getHeader().removeFields(Header.CONTENT_LENGTH);
    req.getHeader().removeFields(Header.CONTENT_TYPE);
    req.setMethod("GET");
}
Also used : Request(com.predic8.membrane.core.http.Request) EmptyBody(com.predic8.membrane.core.http.EmptyBody)

Aggregations

EmptyBody (com.predic8.membrane.core.http.EmptyBody)1 Request (com.predic8.membrane.core.http.Request)1