Skip to content

Instantly share code, notes, and snippets.

@IvanWooll
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IvanWooll/8cd8eb5fea9de4dbb1a2 to your computer and use it in GitHub Desktop.
Save IvanWooll/8cd8eb5fea9de4dbb1a2 to your computer and use it in GitHub Desktop.
Sample call using Koushik Duttas Ion library with a JsonObject as the returned data object
Ion.with(mContext)
.load("GET", "http:.....")
.setLogging("get collection feed item", Log.VERBOSE)
.setHeader("Authorization", "Bearer " + mAccessToken)
.asJsonObject()
.setCallback(new FutureCallback<JsonObject>() {
@Override
public void onCompleted(Exception e, JsonObject result) {
if(e == null){
// do something with the returned json
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment