{"id":50350482,"url":"https://github.com/scruffyfox/AsyncHttpClient","last_synced_at":"2026-06-15T12:01:38.990Z","repository":{"id":6932175,"uuid":"8183448","full_name":"scruffyfox/AsyncHttpClient","owner":"scruffyfox","description":"Updated and standalone version of AsyncHttpClient previously from XLibrary. Although this library will still work, it is considered deprecated as AsyncTask is deprecated.","archived":true,"fork":false,"pushed_at":"2019-01-28T22:04:39.000Z","size":3220,"stargazers_count":107,"open_issues_count":0,"forks_count":48,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-04-16T11:32:28.617Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scruffyfox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-13T17:04:40.000Z","updated_at":"2024-03-31T14:13:25.000Z","dependencies_parsed_at":"2022-08-24T13:39:38.839Z","dependency_job_id":null,"html_url":"https://github.com/scruffyfox/AsyncHttpClient","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/scruffyfox/AsyncHttpClient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scruffyfox%2FAsyncHttpClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scruffyfox%2FAsyncHttpClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scruffyfox%2FAsyncHttpClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scruffyfox%2FAsyncHttpClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scruffyfox","download_url":"https://codeload.github.com/scruffyfox/AsyncHttpClient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scruffyfox%2FAsyncHttpClient/sbom","scorecard":{"id":806501,"data":{"date":"2025-08-11","repo":{"name":"github.com/scruffyfox/AsyncHttpClient","commit":"0897144620bd8b5e3cde89bcc784da50d7df65e0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-23T11:55:13.847Z","repository_id":6932175,"created_at":"2025-08-23T11:55:13.847Z","updated_at":"2025-08-23T11:55:13.847Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34361403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"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":[],"created_at":"2026-05-29T21:00:23.917Z","updated_at":"2026-06-15T12:01:38.953Z","avatar_url":"https://github.com/scruffyfox.png","language":"Java","funding_links":[],"categories":["HTTP客户端"],"sub_categories":["微服务框架"],"readme":"# AsyncHttpClient by Callum Taylor\n\n[![Build Status](https://travis-ci.org/scruffyfox/AsyncHttpClient.svg?branch=develop)](https://travis-ci.org/scruffyfox/AsyncHttpClient)\n\nFollow me on [Twitter](http://twitter.com/scruffyfox) | [Website](http://callumtaylor.net)\n\nThis is the new and improved version of `AsyncHttpClient` taken from X-Library. It was long due a re-write.\n\nIn this version it allows a more flexible usage of posting files, http entities and GZIP handling.\n\nThe library uses Square's OKHTTP library.\n\nIt consists of 2 different classes, `AsyncHttpClient` and `SyncHttpClient`. Obviously by the name, `AsyncHttpClient` is for asynchronous requests which uses the `AsyncTask` paradigm, and `SyncHttpClient` is for synchronous requests which should be handled **by yourself in a thread outside of the UI thread**.\n\n# Usage\n\nSimply import the gradle file into Android Studio and reference the dependancy in your `settings.gradle` and project's `build.gradle`\n\nAlternatively you can add the maven dependancy `net.callumtaylor:asynchttpclient:2.1.1` **N.B. Do NOT use `net.callumtaylor.asynchttp` for the group ID. This is an old ID and will NOT be updated**\n\n# Table of contents\n\n- AsyncHttpClient\n\t1. [Example GET](docs/async-get.md)\n\t2. [Example POST](docs/async-post.md)\n\t3. [Example PUT](docs/async-put.md)\n\t4. [Example DELETE](docs/async-delete.md)\n\t5. [Example custom handler](docs/async-custom.md)\n\n- SyncHttpClient\n\t1. [Example GET](docs/sync-get.md)\n\t2. [Example POST](docs/sync-post.md)\n\t3. [Example PUT](docs/sync-put.md)\n\t4. [Example DELETE](docs/sync-delete.md)\n\t5. [Example custom handler](docs/sync-custom.md)\n\n\n# Other notes\n### Downloading large files\n\nIn order to download large files, you will need to subclass `AsyncHttpResponseHandler` and override the `onByteChunkReceived()` method to write directly to cache instead of appending to a `ByteArrayOutputStream` which is what the standard `BinaryResponseHandler` does. This is to stop OOM due to a over-sized output stream.\n\n### AsyncHttpClient\n\n**Note:** Because `AsyncHttpClient` uses `AsyncTask`, only one instance can be created at a time. If one client makes 2 requests, the first request is canceled for the new request. You can either wait for the first to finish before making the second, or you can create two seperate instances. See: [Example custom handler](docs/async-custom.md) for more.\n\n### SyncHttpClient\n\n`SyncHttpClient` is a paramitized class which means the type you infer to it, is the type that gets returned when calling the method. When supplying a ResponseHandler, that ResponseHandler must also paramitized with the same type as the `SyncHttpClient` instance.\n\nYou can also get the info of the request by calling your `SyncHttpClient` instance and `getConnectionInfo()`. This can only be called after the response has been completed.\n\n**Note:** Because Android requires all network requests to be performed outside the UI thread, you must use SyncHttpClient sparingly and make sure you handle the operaion **OFF** the UI thread.\n\nBecause of the nature of REST, `GET` and `DELETE` requests behave in the same\nway, `POST` and `PUT` requests also behave in the same way.\n\n# License\n\nSee [library/LICENSE](library/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscruffyfox%2FAsyncHttpClient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscruffyfox%2FAsyncHttpClient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscruffyfox%2FAsyncHttpClient/lists"}