Skip to content

Instantly share code, notes, and snippets.

@sjcotto
Last active August 29, 2015 14:03
Show Gist options
  • Save sjcotto/6142a317cbd9a1c93f39 to your computer and use it in GitHub Desktop.
Save sjcotto/6142a317cbd9a1c93f39 to your computer and use it in GitHub Desktop.
Apis Android Rest Json Client and Kona Client
MyPojo pojo = new MyPojo();
Request request = new Request(){
url = "http://host.com/api";
method = HTTP.POST;
data = pojo;
header = new HashMap(){
put("X-AUTH-TOKEN","ASDFN1309ASDF93JJAS471JJ3SNE");
}
public void onSuccess(Response res){
//do something on success
}
public void onError(Response res){
//do something on error
}
}
request.make();
/*
Posible configurations
*/
Request.getConfiguration().disableLoggin();
Request.getConfiguration().enableLoggin();
//The Data supported are any Pojo or a Map
@sjcotto
Copy link
Author

sjcotto commented Jun 26, 2014

data puede ser un objeto de cualquier tipo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment