Skip to content

Instantly share code, notes, and snippets.

@twaddington
Created April 6, 2012 21:15
Show Gist options
  • Save twaddington/2322987 to your computer and use it in GitHub Desktop.
Save twaddington/2322987 to your computer and use it in GitHub Desktop.
LQSession session = mService.getSession();
// Get the current user's profile
session.runGetRequest("account/profile", new OnRunApiRequestListener() {
@Override
public void onSuccess(LQSession session, HttpResponse response) {
// Consume the response!
// ...
JSONObject json = new JSONObject(EntityUtils.toString(response.getEntity()));
}
@Override
public void onFailure(LQSession session, LQException e) {
Log.e(TAG, e.getMessage());
}
@Override
public void onComplete(LQSession session, HttpResponse response, StatusLine status) {
// The server did not return a 200-OK response!
// ...
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment