use of com.predic8.membrane.core.http.xml.Request in project service-proxy by membrane.
the class MessageUtil method getGetRequest.
public static Request getGetRequest(String uri) {
Request req = getStandartRequest(Request.METHOD_GET);
req.setUri(uri);
return req;
}
use of com.predic8.membrane.core.http.xml.Request in project service-proxy by membrane.
the class MessageUtil method getStandartRequest.
private static Request getStandartRequest(String method) {
Request request = new Request();
request.setMethod(method);
request.setVersion(Constants.HTTP_VERSION_11);
return request;
}
use of com.predic8.membrane.core.http.xml.Request in project service-proxy by membrane.
the class HttpUtil method createSOAPValidationErrorResponse.
public static Response createSOAPValidationErrorResponse(String message) {
Response response = new Response();
response.setStatusCode(400);
response.setStatusMessage("Bad request");
response.setHeader(createHeaders(MimeType.TEXT_XML_UTF8));
response.setBodyContent(getFaultSOAPBody(message).getBytes(Constants.UTF_8_CHARSET));
return response;
}
use of com.predic8.membrane.core.http.xml.Request in project service-proxy by membrane.
the class RequestPerformanceVersion4 method testParsing.
@Test
public void testParsing() throws Exception {
Request request = new Request();
parseHeaderReadBufferFirst(request, getStream());
System.out.println(request.getStartLine());
System.out.println(request.getHeader());
}
use of com.predic8.membrane.core.http.xml.Request in project service-proxy by membrane.
the class RequestPerformanceVersion4 method parseHeaderReadBufferFirst.
@Test
public void parseHeaderReadBufferFirst() throws Exception {
long time = System.currentTimeMillis();
for (int i = 0; i <= 1000000; i++) {
parseHeaderReadBufferFirst(new Request(), getStream());
}
System.out.println("time read buffer first: " + (System.currentTimeMillis() - time) / 1000.0);
}
Aggregations