java - Get request out of onResponse -
i have method request using volley library
public void get(string url) { // request string response provided url. stringrequest stringrequest = new stringrequest(request.method.get, url, new response.listener<string>() { @override public void onresponse(string response) { system.out.println("successfull response is: " + response); } }, createmyreqerrorlistener()) { @override public map<string, string> getheaders() throws authfailureerror { hashmap<string, string> headers = new hashmap<>(); headers.put(accept, accept_json); headers.put(auth_id, auth_id_value); headers.put(platform, platform_value); headers.put(cid, ""); system.out.println(headers.tostring()); return headers; } }; // add request requestqueue. queue.add(stringrequest); }
in onresponse override method response object passed onto parser in data class, pass parsed info (images/name etc) activity can display it?
how pass object chain?
Comments
Post a Comment