Skip to content

Added Call Support

Latest
Compare
Choose a tag to compare
@alkathirikhalid alkathirikhalid released this 26 Nov 19:32
· 3 commits to master since this release
50908f4

Makes asynchronous / non blocking http request with easy in a single line. To make a call simply do 2 things out of the box (using AAR File, for JAR file internet permission declaration is required):

Call.execute(taskId,task,method,url,contentTypeRequest,contentTypeResponse,requestBody)


And make your Class / Activity / Fragment / Model / Repository whatever architecture you have implements Task where

onTaskCompleted(int task, int httpCode, Object result) returns the response


Thats it, 2 steps. It is also possible to make synchronous / blocking http request by simply cascaded the calls on Task completed for the consecutive calls.