Getting 400 - Bad Request Java Client
<p>I'm trying to do a request using a small Java program but I'm getting a 400 - Bad Request as response:</p>

<pre><code>URI uri = new URIBuilder().setScheme("https")
                .setHost("somehost.com")
                .setPath("/API/v1/export").build();
        HttpPost post = new HttpPost(uri);
        post.setHeader("X-API-ID", "myId");
        post.setHeader("Accept", "application/json");
        List&lt;NameValuePair&gt; params = new ArrayList&lt;NameValuePair&gt;();
        params.add(new BasicNameValuePair("format", "csv"));
        params.add(new BasicNameValuePair("userId", "userId"));
        post.setEntity(new UrlEncodedFormEntity(params));
        JsonNode responseJson = sendResponseEngineRequest(post);
</code></pre>

<p>This <strong>responseJson</strong> returns the following value:</p>

<blockquote>
  <p>{"meta":{"httpStatus":"400 - Bad
  Request","error":{"errorMessage":"Invalid Content-Type.
  expected=application/json
  found=application/x-www-form-urlencoded","errorCode":"RP_0.1"}}}</p>
</blockquote>

<p>Thanks in advance.</p>