Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 1.16 KB

README.md

File metadata and controls

68 lines (48 loc) · 1.16 KB

Sprint

Sprint is a RESTful android java library

Gradle:

In project level gradle:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

In app level gradle:

dependencies {
    implementation 'com.github.ostamustafa:sprint:1.0.3'
}

Usage:

GET Example:

Sprint.instance()
.request("http://some.url")
    .execute(new SprintCallback() {
        
        @Override
        public void onResponse(Response response) {
        
        }
        
        @Override
        public void onException(Exception e) {
        
        }
    });

POST and other methods:

Sprint.instance(Method.POST)
    .request("http://some.url", args)
    .execute(new SprintCallback() {
        
        @Override
        public void onResponse(Response response) {
        
        }
        
        @Override
        public void onException(Exception e) {
        
        }
    });

args can be HashMap<String, String> or JSONObject or String

more information will be added later on