Code example for HttpHost

0
          new BasicHttpEntityEnclosingRequest(request.getMethod(), url);
      if (request.hasPayload()) {
        r.setEntity(new StringEntity(request.getPayload().toString(), "UTF-8"));
      } 
 
      HttpHost h = new HttpHost(host, port);
      long start = System.currentTimeMillis();
      HttpResponse res = client.execute(h, r);
      total = System.currentTimeMillis() - start;
 
      response = Helper.exctractResponse(res);
    } catch (Exception e) {
      throw new WebDriverException(e);
    } 
    response = errorHandler.throwIfResponseFailed(response, total);
    return cast(response.getValue());
  } 
 
  @Override 
  public JSONObject logElementTree(File screenshot, boolean translation) throws WebDriverException {
    WebDriverLikeRequest request = buildRequest(WebDriverLikeCommand.TREE_ROOT,