use of com.hotels.styx.api.HttpMethod in project styx by ExpediaGroup.
the class HttpRequestOperation method toNettyRequest.
// Visible for testing
static DefaultHttpRequest toNettyRequest(LiveHttpRequest request) {
HttpVersion version = request.version();
HttpMethod method = request.method();
String url = request.url().toString();
DefaultHttpRequest nettyRequest = new DefaultHttpRequest(toNettyVersion(version), toNettyMethod(method), url, true);
request.headers().forEach((name, value) -> nettyRequest.headers().add(name, value));
return nettyRequest;
}
Aggregations