Popularity
1.7
Stable
Activity
0.0
Stable
32
1
13
Programming language: Java
Tags:
Network
HttpAgent alternatives and similar packages
Based on the "Network" category.
Alternatively, view HttpAgent alternatives based on common mentions on social networks and blogs.
-
okhttp
Square’s meticulous HTTP client for the JVM, Android, and GraalVM. -
AndroidAsync
Asynchronous socket, http(s) (client+server) and websocket library for android. Based on nio, not threads. -
async-http-client
Asynchronous Http and WebSocket Client library for Java -
AndroidNetworking
🚀 A Complete Fast Android Networking Library that also supports HTTP/2 🚀 -
Android Volley
Official Android HTTP library that makes networking for easier and faster. -
robospice
Repo of the Open Source Android library : RoboSpice. RoboSpice is a modular android library that makes writing asynchronous long running tasks easy. It is specialized in network requests, supports caching and offers REST requests out-of-the box using extension modules. -
unirest-java
Unirest in Java: Simplified, lightweight HTTP client library. -
android-lite-http
LiteHttp is a simple, intelligent and flexible HTTP framework for Android. With LiteHttp you can make HTTP request with only one line of code! It could convert a java model to the parameter and rander the response JSON as a java model intelligently. -
OptimusHTTP
:satellite: [Android Library] Simplified async networking in android -
Rx.Network
Observe Android's CONNECTIVITY_CHANGE broadcasts using RxJava. -
networking
An android asynchronous http client built on top of HttpURLConnection. -
NetworkConnection
No description, website, or topics provided. -
Minimized API Service Library
Minimized API library which is used call the server request in andorid. -
Packetzoom
SDK for optimizing HTTP requests and free analytics service for networking.
Appwrite - The Open Source Firebase alternative introduces iOS support
Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!
Promo
appwrite.io
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of HttpAgent or a related project?
README
HttpAgent
super simple library to manage http requests.
Gradle
dependencies {
implementation 'com.studioidan.httpagent:httpagent:[email protected]'
}
Now see how easy it becomes with HttpAgent!
Get Request
HttpAgent.get("www.example.com/api/books")
.goJson(new JsonCallback() {
@Override
protected void onDone(boolean success, JSONObject jsonObject) {
}
});
or you can go jsonArray like so
HttpAgent.get("www.example.com/api/books")
.goJsonArray(new JsonArrayCallback() {
@Override
protected void onDone(boolean success, JSONArray jsonArray) {
}
});
Need to add url parameters? no problem!
HttpAgent.get("www.example.com/api/books")
.queryParams("key_1","value_1","key_2","value_2","key_N","value_N")
.goJsonArray(new JsonArrayCallback() {
@Override
protected void onDone(boolean success, JSONArray jsonArray) {
}
});
Post? Put? Delete? of course...
HttpAgent.post("www.example.com/api/books");
HttpAgent.put("www.example.com/api/books");
HttpAgent.delete("www.example.com/api/books")
Adding body is also simple...
HttpAgent.post("www.example.com/api/books")
.queryParams("key_1","value_1","key_2","value_2","key_N","value_N")
.withBody("{name:popapp ,age:27}")
.goJsonArray(new JsonArrayCallback() {
@Override
protected void onDone(boolean success, JSONArray jsonArray) {
}
});
Or even more simple...
HttpAgent.post("www.example.com/api/books")
.queryParams("key_1","value_1","key_2","value_2","key_N","value_N")
.withBody("key_1","value_1","key_2","value_2","key_N","value_N") // will be converted to json
.goJsonArray(new JsonArrayCallback() {
@Override
protected void onDone(boolean success, JSONArray jsonArray) {
}
});
Don't forget the headers...
HttpAgent.get("http://192.168.88.253/Video/inputs/channels/1")
.headers("Authorization", "Basic YWRtaW46P3V5YFZhNzAw", "Content-Type", "application/json")
.goString(new StringCallback() {
@Override
protected void onDone(boolean success, String stringResults) {
Log.d(TAG, stringResults);
}
});
Any request can be made with one of the following callbacks:
Get a string results
goString(new StringCallback() {
@Override
protected void onDone(boolean success, String results) {
}
})
Get Json results
goJson(new JsonCallback() {
@Override
protected void onDone(boolean success, JSONObject jsonObject) {
}
})
Get JsonArray results
goJsonArray(new JsonArrayCallback() {
@Override
protected void onDone(boolean success, JSONArray jsonArray) {
}
});
Get no results, Just send the request
go(new SuccessCallback() {
@Override
protected void onDone(boolean success) {
}
})
You also have access to those on any callback
HttpAgent.post("www.example.com/api/books")
.queryParams("key_1","value_1","key_2","value_2","key_N","value_N")
.withBody("{name:popapp ,age:27}")
.goJson(new JsonCallback() {
@Override
protected void onDone(boolean success, JSONObject jsonObject) {
getErrorMessage(); //returns error message if exists.
getResponseCode(); // well, it's obvious...
getStringResults(); // returns results as as string.
}
});