Skip to content

Instantly share code, notes, and snippets.

@ivan-leschinsky
Created February 22, 2016 07:29
Show Gist options
  • Select an option

  • Save ivan-leschinsky/4b9a36f7b381df7fdbc5 to your computer and use it in GitHub Desktop.

Select an option

Save ivan-leschinsky/4b9a36f7b381df7fdbc5 to your computer and use it in GitHub Desktop.
Ion.with(this)
.load("https://url")
.basicAuthentication("user", "pass")
.asJsonObject()
.setCallback(new FutureCallback<JsonObject>() {
@Override
public void onCompleted(Exception e, JsonObject result) {
if (e != null) {
// Error loading url
return;
}
//
accessToken = result.get("access_token").getAsString();
//
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment