Skip to content

Instantly share code, notes, and snippets.

@alamer
Created November 15, 2018 11:40
Show Gist options
  • Save alamer/2c1e5f88dd11553d05fcb665e03a013f to your computer and use it in GitHub Desktop.
Save alamer/2c1e5f88dd11553d05fcb665e03a013f to your computer and use it in GitHub Desktop.
HttpPost request = new HttpPost(m.getRequestURL());
request.addHeader("content-type", "application/json; charset=UTF-8");
System.out.println(m.getAuthKey());
request.addHeader("Authorization", "Basic " + m.getAuthKey());
StringEntity params = new StringEntity(m.getBody(),"UTF-8");
request.setEntity(params);
HttpResponse response = httpClient.execute(request);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment