Skip to content

A lightweight URLConnection HTTP wrapper library for android.

Notifications You must be signed in to change notification settings

fingerart/ExHttp

Repository files navigation

ExHttp

A lightweight URLConnection HTTP wrapper library for android.

Usage

Bintray

compile 'io.chengguo.android:ExHttp:1.1.0'

Sample

//Sync
ExHttp.get()
      .url("http://httpbin.org/get")
      .addQuery("k1", "v1")
      .addHeader("hello", "world")
      .build()
      .execute();

//Async
IHttpRequestCallback callback = 
        new IHttpRequestCallback() {
            @Override
            public void onStart() {
            }

            @Override
            public void onSuccess(Response response) {
            }

            @Override
            public void onError(Exception e) {
            }

            @Override
            public void onFinish() {
            }
        };
ExHttp.get()
      .url("http://httpbin.org/kkkkk")
      .addQuery("q1", "qv1")
      .build()
      .execute(callback);

About

A lightweight URLConnection HTTP wrapper library for android.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages