{"id":18789236,"url":"https://github.com/dsiner/aster","last_synced_at":"2025-08-29T09:22:43.861Z","repository":{"id":202173108,"uuid":"260715781","full_name":"Dsiner/Aster","owner":"Dsiner","description":"Aster is a network request library for android, supporting HttpURLConnection, Volley, OkHttp3, Retrofit2 as HTTP client.","archived":false,"fork":false,"pushed_at":"2021-01-10T14:05:52.000Z","size":1365,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-21T13:14:25.657Z","etag":null,"topics":["http","httpurlconnection","network","okhttp3","request","retrofit2","volley"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dsiner.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-05-02T15:24:32.000Z","updated_at":"2021-01-10T14:05:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"8355ff75-48d6-45bb-aac5-cb63cb7184d2","html_url":"https://github.com/Dsiner/Aster","commit_stats":null,"previous_names":["dsiner/aster"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Dsiner/Aster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dsiner%2FAster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dsiner%2FAster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dsiner%2FAster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dsiner%2FAster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dsiner","download_url":"https://codeload.github.com/Dsiner/Aster/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dsiner%2FAster/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272659283,"owners_count":24971607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http","httpurlconnection","network","okhttp3","request","retrofit2","volley"],"created_at":"2024-11-07T21:07:00.897Z","updated_at":"2025-08-29T09:22:43.835Z","avatar_url":"https://github.com/Dsiner.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aster for Android\n\n[![License](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![API](https://img.shields.io/badge/API-9%2B-green.svg?style=flat)](https://android-arsenal.com/api?level=9)\n[![Download](https://api.bintray.com/packages/dsiner/maven/aster/images/download.svg) ](https://bintray.com/dsiner/maven/aster/_latestVersion)\n[![Readme](https://img.shields.io/badge/README-%E4%B8%AD%E6%96%87-brightgreen.svg)](https://github.com/Dsiner/Aster/blob/master/README-zh.md)\n[![Wiki-Guide](https://img.shields.io/badge/Wiki-Guide-brightgreen.svg)](https://github.com/Dsiner/Aster/wiki)\n\n\u003e Aster is a network request library for android, supporting `HttpURLConnection`, `Volley`, `OkHttp3`, `Retrofit2` as HTTP client.\n\n## Set up\nMaven:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.dsiner.lib\u003c/groupId\u003e\n  \u003cartifactId\u003easter\u003c/artifactId\u003e\n  \u003cversion\u003e2.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\nor Gradle:\n```groovy\n    implementation 'com.dsiner.lib:aster:2.1.0'\n    implementation 'com.dsiner.lib:aster-adapter-http:2.1.0'\n    implementation 'com.dsiner.lib:aster-adapter-okhttp3:2.1.0'\n    implementation 'com.dsiner.lib:aster-adapter-retrofit:2.1.0'\n```\nor Gradle(OkHttp3 lite):\n```groovy\n    implementation 'com.dsiner.lib:aster:2.1.0'\n    implementation 'com.dsiner.lib:aster-adapter-okhttp3:2.1.0'\n```\nor Gradle(Retrofit2 lite):\n```groovy\n    implementation 'com.dsiner.lib:aster:2.1.0'\n    implementation 'com.dsiner.lib:aster-adapter-okhttp3:2.1.0'\n    implementation 'com.dsiner.lib:aster-adapter-retrofit:2.1.0'\n```\nor Gradle(HttpURLConnection lite):\n```groovy\n    implementation 'com.dsiner.lib:aster:2.1.0'\n    implementation 'com.dsiner.lib:aster-adapter-http:2.1.0'\n```\n\n## Integration libraries\n* HttpURLConnection\n* OkHttp3\n* Volley\n    * HttpURLConnection\n    * HttpClient\n    * OkHttp3\n* Retrofit\n\n## Features\n- You can switch clients from HttpURLConnection or OkHttp3 or Volley or Retrofit2.\n- A chain, full chain call `.func0().func1().func2()...` , `adaptive`, `simple`.\n- Two client forms (`Singleton` global configuration, `New instance` fully custom configuration).\n- Three chain forms, fully extended.\n\n## Support\n- [x] Support Get, Post, Head, Options, Put, Patch, Delete request protocol.\n- [x] Support file download, progress callback.\n- [x] Support file upload, progress callback.\n- [x] Support for adding fixed headers, dynamic headers.\n- [x] Support failure retry mechanism, you can specify the number of retries, retry interval.\n- [x] Support Tag, Cancel Request, Unsubscribe.\n\n### How do I use Aster?\n\nSimple use cases will look something like this:\n```java\n        Params params = new Params(\"https://api.douban.com/v2/movie/top250\");\n        params.addParam(\"start\", \"0\");\n        params.addParam(\"count\", \"10\");\n        Aster.get(params.rtp, params)\n                .request(new SimpleCallback\u003cMovieInfo\u003e() {\n                    @Override\n                    public void onSuccess(MovieInfo response) {\n                        ...do something in main thread\n                    }\n\n                    @Override\n                    public void onError(Throwable e) {\n                        ...do something in main thread\n                    }\n                });\n```\n\nDownload:\n```java\n        Aster.download(url)\n                .connectTimeout(60 * 1000)\n                .readTimeout(60 * 1000)\n                .writeTimeout(60 * 1000)\n                .retryCount(3)\n                .retryDelayMillis(1000)\n                .tag(url)\n                .request(path, name, new ProgressCallback() {\n                    @Override\n                    public void onStart() {}\n\n                    @Override\n                    public void onProgress(long currentLength, long totalLength) {}\n\n                    @Override\n                    public void onSuccess() {}\n\n                    @Override\n                    public void onError(Throwable e) {}\n\n                    @Override\n                    public void onCancel() {}\n                });\n```\n\nUpload:\n```java\n        Aster.upload(url)\n                .connectTimeout(60 * 1000)\n                .readTimeout(60 * 1000)\n                .writeTimeout(60 * 1000)\n                .retryCount(3)\n                .retryDelayMillis(1000)\n                .addImageFile(\"file\", file.getName(), file)\n                .request(new UploadCallback\u003cString\u003e() {\n                             @Override\n                             public void onStart() {}\n\n                             @Override\n                             public void onProgress(long currentLength, long totalLength) {}\n\n                             @Override\n                             public void onSuccess() {}\n\n                             @Override\n                             public void onSuccess(String response) {}\n\n                             @Override\n                             public void onError(Throwable e) {}\n\n                             @Override\n                             public void onCancel() {}\n                         }\n                );\n```\n\nMore usage see [Wiki.](https://github.com/Dsiner/Aster/wiki)\n\n## Latest Changes\n- [Changelog.md](CHANGELOG.md)\n\n## Licence\n\n```txt\nCopyright 2017 D\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsiner%2Faster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsiner%2Faster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsiner%2Faster/lists"}