onSuccess(IRequest, IResponse) method

Request library uses this method in case of successful request.

Syntax

public void onSuccess (
    IRequest aRequest,
    IResponse aResponse
)

Parameters

Returns

None

Remarks

The listener receives the request in form of parameter and an HttpResponse object containing all the details about the server response.

Example 1

public class Activity implements INetListener { .... public void onSuccess(IRequest arg0, IResponse arg1) {

HttpEntity resp = arg1.getEntity();

String response="";

response = EntityUtils.toString(resp); //process the response }...}