Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HttpClient client = getHttpClient();
- HttpGet httpget = new HttpGet(url);
- httpget.setHeader("Authorization", "Bearer " + token);
- try {
- HttpResponse getResponse = client.execute(httpget);
- final int statusCode = getResponse.getStatusLine().getStatusCode();
- if(statusCode != HttpStatus.SC_OK) {
- return null;
- }
- HttpEntity getResponseEntity = getResponse.getEntity();
- } catch (Exception e) {
- //
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement