Beispiel #1
0
 @Override
 public Result get(HttpUrl url, String encoding, String cookie, Map<String, String> headers) {
   String realUrl = url.toUrlString();
   GetMethod method = new GetMethod(realUrl);
   Result result = excuteMethod(method, cookie, headers);
   result.setResultEncoding(encoding);
   return result;
 }
Beispiel #2
0
 public void execute(Context context, Navigator navigator) {
   TurbineRunDataInternal runData =
       (TurbineRunDataInternal) TurbineUtil.getTurbineRunData(request);
   ParameterParser param = runData.getParameters();
   String url = param.getString("url");
   HttpUrl httpUrl = UrlParseUtils.parseUrl(url);
   for (String key : param.keySet()) {
     if (!"url".equals(key)) {
       httpUrl.getQueryParam().put(key, param.getString(key));
     }
   }
   url = httpUrl.toUrlString();
   runData.redirectToLocation(url);
 }