title: How to send Form Data when using Jersey's WebResource for a POST?
body: <p>I have a Postman POST request which looks like the following:</p>
  
  <p><a href="https://i.stack.imgur.com/D7RTe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D7RTe.png" alt="enter image description here"></a></p>
  
  <p>The code I'm using to map the above into code using Jersey's <code>WebResource</code> is the following, but it's not working:</p>
  
  <pre><code>Client authKeyClient = Client.create();
  WebResource webResource = authKeyClient.resource("https://ims-na1-stg1.company.com/token/v1");
  String input = "{\"grant_type\":\"authorization_code\",\"client_id\":\"orders\",\"client_secret\":\"0af3b233-f1ca-41da-a0fa-61c08d15cadc\",\"code\":\"eyJhbGciOiJSUzI1NiIsIng1dSI6Imltc19uYTEtc\"}";
  currentEnv.getImsSecret()).header("code", currentEnv.imsCode).get(String.class);
  String response = webResource.post(String.class, input);
  </code></pre>
  
  <p>I end up getting a <code>400 Bad Request</code>. What am I doing wrong ?</p>