use of oap.http.Request in project oap by oaplatform.
the class PatternCorsPolicyTest method getRequest.
private static Request getRequest(final String origin, final String url) throws UnknownHostException {
final BasicHttpRequest basicHttpRequest = new BasicHttpRequest("GET", url);
basicHttpRequest.addHeader("Origin", origin);
basicHttpRequest.addHeader("Host", "some-host");
final Context context = new Context("not important", InetAddress.getLocalHost(), "not important");
return new Request(basicHttpRequest, context);
}
Aggregations