Skip to content

light weight dsl to make simple http requests easier with android

Notifications You must be signed in to change notification settings

masterweily/android-http-dsl

Repository files navigation

android-http-dsl

light weight dsl to make simple http requests easier with android

Install and configuration

  • Add library files to your project
  • Add permission for internet access in the project manifest file:
```xml ```

Examples

Sending Simple Synchronous Post / Get Request

String response = new HttpDsl.Request("some-url.com").get().response().toString(); // get request

String response = new HttpDsl.Request("some-url.com").post().response().toString(); // post request

Reques With Parameters

String response = String response = new HttpDsl.Request("some-url.com").param("id","32").get().response().toString();

Asynchronous Requests

new HttpDsl.Request("some-url.com").post(new HttpDsl.Request.Listener() {
  @Override
  public void onSuccess(HttpDsl.Response response) {
    Log.d("http-dsl", response.toString());
  }
});

About

light weight dsl to make simple http requests easier with android

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages