Popularity
4.3
Stable
Activity
2.7
-
82
3
4

Programming language: Kotlin
License: Apache License 2.0
Tags: Http Clients    
Latest version: v1.0.2

Asynkio alternatives and similar libraries

Based on the "Http Clients" category.
Alternatively, view Asynkio alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Asynkio or a related project?

Add another 'Http Clients' Library

README

Asynkio : Write asynced IO/ Network calls painlessly on android

Awesome Kotlin Badge| Download | Build Status | Documentation

Write your network requests, IO calls in android with Kotlin seamlessly. Asynkio Inspired by python's asyncio

What I mean is..

async {
    //All network requests on couroutines
    val response = await {
        //Get the data
        val resp = get("https://awesome.com/lib", params = mapOf("lib" to "Asynkio"))

        //Post the data
        return@await post("https://youareonfire.com/lib", data = mapOf("id" to resp.jsonObject["id"]))
    }
    //Process the result on UI thread
    if (response.statusCode == 200){
        yoTextView.text = response.text
    }
}

Yes, that's it. No retrofit. No Volley. Java/Kotlin are very bad at handling the http requests, but still Asynkio is the optimal way. No extra overhead, Seriously...No bullshit!

Another example

async {
    filename = await {
        longRunningFileOperation(content)
    }
}.onError {
    Toast.makeText(context, "Oops ! it failed",Toast.LENGTH_LONG).show()
}.finally {
    closeTheFile(filename)
}

Want to use it? Checkout full documentation over here Getting Started

Implementation

Gradle

implementation 'me.nikhilchaudhari:asynkio:{latest-version}'

Maven

<dependency>
    <groupId>me.nikhilchaudhari</groupId>
    <artifactId>asynkio</artifactId>
    <version>{latest-version}</version>
    <type>pom</type>
</dependency>

Please check releases for latest version

Documentation


License

   Copyright 2019 @ Nikhil Chaudhari

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


*Note that all licence references and agreements mentioned in the Asynkio README section above are relevant to that project's source code only.