Boa tarde!
Estou tentando fazer umas chamadas REST conforme o código abaixo, mas está sempre retornando um 400!
Alguém consegue ajudar?
httpClient = new DefaultHttpClient();
httpClient.getCredentialsProvider().setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(proxy_usuario, proxy_senha));
httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
parametersBody.add(new BasicNameValuePair("grant_type", GRANT_TYPE));
parametersBody.add(new BasicNameValuePair("User", USER));));
parametersBody.add(new BasicNameValuePair("Key", KEY));));
post = new HttpPost(SERVER + AUTHENTICATION);
post.addHeader("Content-Type", "application/x-www-form-urlencoded");
post.setEntity(new UrlEncodedFormEntity(parametersBody));
response = httpClient.execute(proxy, post);