Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String url = "https://newsapi.org/v2/everything";
- JsonObjectRequest req = new JsonObjectRequest(Request.Method.GET, url + "?q=china", null, jsonobject ->
- textView.setText(jsonobject.toString())
- , Throwable::printStackTrace) {
- @Override
- public Map<String, String> getHeaders() {
- Map<String, String> headers = new HashMap<>();
- headers.put("Authorization", apikey);
- return headers;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement