title: Getting the OAUTH2 Token
body: <p>I'm trying to retrieve a OAUTH2 token from our IDM server - I've tried several flavors of rudimentary examples, but all of them return a 200 status with no code included.  I can do it with no trouble via postman, using a header of:</p>
  
  <pre><code>Content-Type application/x-www-form-urlencoded
  </code></pre>
  
  <p>... and sending the client_id, redirect_uri and code parameters.  I get something back that looks like this:</p>
  
  <pre><code>{
      "access_token": "abcd...",
      "token_type": "bearer",
      "expires_in": 3600
  }
  </code></pre>
  
  <p>Here's the super rudimentary code intended to do no more than see if I can grab the token (at this point):</p>
  
  <pre><code>public class Service {
  
  public String getToken() {
  
      String client_id = "f2e8...";
      String redirect_uri = "https://mysite/";
      String code = "AAAAAA...";
  
      form = new Form();
      form.param("client_id", client_id);
      form.param("code", code);
      form.param("redirect_uri", redirect_uri);
      JerseyClientBuilder jerseyClientBuilder = new JerseyClientBuilder();
      JerseyWebTarget jerseyWebTarget = 
      jerseyClientBuilder.build().target("https://token-source-site/");
      Response response = jerseyWebTarget.request().post(Entity.form(form));
      return response.toString();
    }
  }
  </code></pre>
  
  <p>But all I get back is:</p>
  
  <pre><code>InboundJaxrsResponse{context=ClientResponse{method=POST, 
  uri=https://token-source-site/, status=200, reason=OK}}
  </code></pre>
  
  <p>Any thoughts on what Postman might be doing that my code isn't?</p>