SHARE
TWEET

Untitled

a guest Jul 24th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. String url = "https://newsapi.org/v2/everything";
  2.         JsonObjectRequest req = new JsonObjectRequest(Request.Method.GET, url + "?q=china", null, jsonobject ->
  3.                 textView.setText(jsonobject.toString())
  4.                 , Throwable::printStackTrace) {
  5.             @Override
  6.             public Map<String, String> getHeaders() {
  7.                 Map<String, String> headers = new HashMap<>();
  8.                 headers.put("Authorization", apikey);
  9.                 return headers;
  10.             }
  11.         };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top