WebClient

WebClient allows simple asynchronous http requests and implements listeners.

Лицензия

Лицензия

Категории

Категории

CLI Взаимодействие с пользователем
Группа

Группа

me.aflak.libraries
Идентификатор

Идентификатор

webclient
Последняя версия

Последняя версия

1.2
Дата

Дата

Тип

Тип

aar
Описание

Описание

WebClient
WebClient allows simple asynchronous http requests and implements listeners.
Ссылка на сайт

Ссылка на сайт

https://github.com/omaflak/WebClient
Система контроля версий

Система контроля версий

https://github.com/omaflak/WebClient

Скачать webclient

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/me.aflak.libraries/webclient/ -->
<dependency>
    <groupId>me.aflak.libraries</groupId>
    <artifactId>webclient</artifactId>
    <version>1.2</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/me.aflak.libraries/webclient/
implementation 'me.aflak.libraries:webclient:1.2'
// https://jarcasting.com/artifacts/me.aflak.libraries/webclient/
implementation ("me.aflak.libraries:webclient:1.2")
'me.aflak.libraries:webclient:aar:1.2'
<dependency org="me.aflak.libraries" name="webclient" rev="1.2">
  <artifact name="webclient" type="aar" />
</dependency>
@Grapes(
@Grab(group='me.aflak.libraries', module='webclient', version='1.2')
)
libraryDependencies += "me.aflak.libraries" % "webclient" % "1.2"
[me.aflak.libraries/webclient "1.2"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.android.support » appcompat-v7 jar 23.2.1

Модули Проекта

Данный проект не имеет модулей.

WebClient

WebClient allows simple asynchronous requests to api's

Install

Add to your dependencies:

compile 'me.aflak.libraries:webclient:1.2'

Use

  1. Initilize the object and add the listener

    WebClient client = new WebClient(); client.setOnRequestListener(new OnRequestListener() { @Override public void onRequest(String response, int requestID, Objects... objects) { String my_string = (String) object[0]; Log.e(TAG, response); }

         @Override
         public void onError(int error_code, String message) {
             Log.e(TAG, message);
         }
    

    });

  2. Make the request

    // requestAsync(String url, String method, List<Pair<String, String>> postData, int requestID, Object... objects) client.requestAsync("http://your-api.com", WebClient.GET, null, 0, "a string I want to get back when request is done");

Sample

https://github.com/omaflak/WebClient/blob/master/app/src/main/java/me/aflak/libraries/MainActivity.java

Версии библиотеки

Версия
1.2
1.1
1.0