https://github.com/developer-shivam/perfecto
:ok_hand: Http Connection calls made easy. Simple wrapper to AsyncTask with Error Handling.
https://github.com/developer-shivam/perfecto
Last synced: about 1 year ago
JSON representation
:ok_hand: Http Connection calls made easy. Simple wrapper to AsyncTask with Error Handling.
- Host: GitHub
- URL: https://github.com/developer-shivam/perfecto
- Owner: developer-shivam
- License: apache-2.0
- Created: 2016-08-04T07:20:46.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-03T10:09:28.000Z (over 9 years ago)
- Last Synced: 2025-03-24T13:11:18.466Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 114 KB
- Stars: 33
- Watchers: 4
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#perfecto - Network request with ease.
[](http://www.apache.org/licenses/LICENSE-2.0.html)
## Use Case for "GET" Request
```java
Perfecto.with(MainActivity.this)
.fromUrl("http://www.google.com")
.ofTypeGet()
.connect(new OnNetworkRequest() {
@Override
public void onStart() {
}
@Override
public void onSuccess(String response) {
Log.d("Response", response);
}
@Override
public void onFailure(int responseCode, String responseMessage, String errorStream) {
Log.d("Response code", String.valueOf(responseCode));
Log.d("Response message", responseMessage);
Log.d("Error stream", errorStream);
}
});
```
## Integration
Add these lines in build.gradle at project leve
```
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
```
Add these lines in build.gradle at app level
```
dependencies {
compile 'com.github.developer-shivam:perfecto:1.0.0'
}
```
## License
Copyright (c) 2016 Shivam Satija
Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)