title: Request is not going through mitm proxy when I am trying to hit it from Java Code
body: <p>I am trying trying to connect to a website(http) through my java code where I am setting target host as the mitm proxy, but on the proxy side I am getting this error</p>
  
  <pre><code>Invalid HTTP request form (expected: authority or absolute, got: relative)
  xxx.xx.xx.xxx:xxxxx: HTTP protocol error in client request: Invalid HTTP request form (expected: authority or absolute, got: relative)
  </code></pre>
  
  <p>and in java response I am getting 400 Bad Request.</p>
  
  <p>Below is the code I am trying to run:</p>
  
  <pre><code>        HttpHost target = new HttpHost("xx.x.x.x7", xxxx);
  
          HttpPost post = new HttpPost("http://weevil.info/");
          post.addHeader("content-type", "application/x-www-form-urlencoded");        
          CloseableHttpClient client = HttpClientBuilder.create().build();
  
             // send the post request
          HttpResponse response = client.execute(target, post);
          System.out.println(response);
  </code></pre>
  
  <p>Command used to run mitm:</p>
  
  <pre><code>mitmdump -p 8083 -s mitmProxy.py
  </code></pre>