Last active
August 29, 2015 14:03
-
-
Save sjcotto/6142a317cbd9a1c93f39 to your computer and use it in GitHub Desktop.
Apis Android Rest Json Client and Kona Client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
data puede ser un objeto de cualquier tipo