title: Jersey Client + set proxy
body: <p>Hi I've a jersey client which i use to upload a file. I tried using it locally and everything works fine. But in production environment i've to set proxy. I browsed thru few pages but could not get exact solution. Can someone pls help me with this?</p>
  <p>here is my client code:</p>
  <pre><code>File file = new File(&quot;e:\\test.zip&quot;);
  FormDataMultiPart part = new FormDataMultiPart();
  part.bodyPart(new FileDataBodyPart(&quot;file&quot;, file, MediaType.APPLICATION_OCTET_STREAM_TYPE));
  WebResource resource = null;
  
  if (proxy.equals(&quot;yes&quot;)) {
      // How do i configure client in this case?
  } else {
      // this uses system proxy i guess
      resource = Client.create().resource(url);
  }
  
  String response = (String) resource.type(MediaType.MULTIPART_FORM_DATA_TYPE).post(String.class, part);
  System.out.println(response);
  </code></pre>