OkHttp
Square’s meticulous HTTP client for the JVM, Android, and GraalVM. (by square)
okio
A modern I/O library for Android, Java, and Kotlin Multiplatform. (by square)
Our great sponsors
OkHttp | okio | |
---|---|---|
37 | 14 | |
43,733 | 8,296 | |
0.3% | 0.3% | |
9.1 | 6.4 | |
4 days ago | 8 days ago | |
Kotlin | Kotlin | |
Apache License 2.0 | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
OkHttp
Posts with mentions or reviews of OkHttp.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-03-06.
-
What stack to use for app with functionality like event calendar?
Retrofit in combination with OkHttp for fetching data from server (which hopefully already exists)
- Generate Kotlin client for a complex web API
-
Modern Android Development in 2023
OkHttp
-
Is it acceptable to use mock servers, like Postman, for testing in Android?
Being more familiar with Android development only, I mainly use https://github.com/square/okhttp/tree/master/mockwebserver
-
Best libraries for Android Developers
Retrofit is the best library that lets you connect to HTTP-based API services from your Android applications. It leverages the OkHttp library’s core functionality, adding a bunch of features to it while eliminating the boilerplate code.
-
How to use Cronet Engine for API calls? Any simple repo for it to understand?
Use Retrofit or anything else that builds on OkHttp. If you do end up needing some features that Cronet supports but OkHttp doesn't (such as HTTP/3), just write an interceptor or use google/cronet-transport-for-okhttp.
-
IPv6 Support on Android
Even as of 2022, there are networks out there that have broken/misconfigured IPv6, and there most likely always will be. Some wireless carriers and ISPs support it, but in some cases, people have old or improperly-configured routers and devices. Patchy IPv6 support is less of a problem on iOS and the web these days since those clients have support for dynamically falling back on IPv4 when IPv6 fails. After more research, we realized that Android didn’t have this “dual-stack” IP support, and neither did our preferred networking library, OkHttp. This explained why the content-loading issues only surfaced on Android, and why it took some additional digging to uncover the root cause.
Working with the reddit infrastructure team, we did more testing and built high confidence that this last IPv6 theory was indeed the cause of users’ content-loading problems. We assessed our usage of OkHttp and checked if there were any upcoming plans to improve support. OkHttp did have an open ask for “Happy Eyeballs” #506, but no known plans to implement it. Out of due diligence, we also assessed other network libraries– but knew that moving off OkHttp would be a radical change, indeed. We read the RFC 8305, “Happy Eyeballs algorithm for dual-stack IPv4/IPv6”, and thought “wow, we don’t want to implement this ourselves.” And as we were studying that open OkHttp issue and thinking “If only they would…”
-
App Flow of an Android App?
Your app would request data from the backend inside it's domain layer. As the other commenter mentioned, Retrofit is a commonly used library for interfacing with REST APIs, which is built on top of OkHttp (a more generic HTTP client).
-
Watery : A water delivery solution android app
OkHttp
okio
Posts with mentions or reviews of okio.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-12-03.
-
Why tools have Kotlin native to work with bytes?
Yeah Kotlin's own standard library is a lot smaller than Java's currently so you'll need to use something third-party for this. Okio is a popular option https://square.github.io/okio/ it has a Buffer type which is pretty similar to Java's ByteBuffer
-
can I access and manipulate the iOS filesystem with kotlin multiplatform?
Use okio, it is Multiplatform now. I use this for my own library KStore
-
Windows Central: "Microsoft to merge Surface Pro X ARM and Surface Pro 9 Intel versions under one product line"
For networking, file IO, and streams in general, there's Korio and for Java; for just networking, there's LiteNetLib for C#; for what looks like data streams in general, there's Okio also for Java; and Tokio for multi-threaded IO in Rust.
-
Porting C++ code to Kotlin (ISO 15765-2)
Okio is nice for input/output streams, and sockets.
-
Kotlin/native: library for file io?
Sounds like you want https://square.github.io/okio/
Try OKIO: https://github.com/square/okio/
- Are there any libraries well suited to the manipulation of bits, bytes and byte arrays used in packet communication?
-
Kotlin Team AMA #3: Ask Us Anything
On JVM, there is plenty of existing solution already on for multiplatform uses I'd suggest checking amazing Okio library by Square, that seems to cover most of basic use-cases.
- 60% of school apps are sending student data with third parties without consent
-
Simplify HTTP requests on mobile with these libraries
OkHttp depends on Square’s Okio and Kotlin to provide great performance and backwards-compatibility. It’s really easy to use, but it can be hard if you have to work on complicated stuff like mid-connection checks or proxy tunneling. Plus, it won’t chart the results directly into objects. It has been developed with a simplicity mind-set. You can find more about OkHttp here.
What are some alternatives?
When comparing OkHttp and okio you can also consider the following projects:
unirest-java - Unirest in Java: Simplified, lightweight HTTP client library.
Async Http Client - Asynchronous Http and WebSocket Client library for Java
Netty - Netty project - an event-driven asynchronous network application framework
Retrofit - A type-safe HTTP client for Android and the JVM
Android Volley
gRPC - The Java gRPC implementation. HTTP/2 based RPC
android-async-http - This project under develop
Finagle - A fault tolerant, protocol-agnostic RPC system
Dubbo - Apache Dubbo is a high-performance, java based, open source RPC framework.
Undertow - High performance non-blocking webserver
kotlinx.coroutines - Library support for Kotlin coroutines
Fetch - The best file downloader library for Android