{"id":20730901,"url":"https://github.com/saasquatch/apache-client5-reactive","last_synced_at":"2026-06-04T19:31:21.612Z","repository":{"id":45987949,"uuid":"243619135","full_name":"saasquatch/apache-client5-reactive","owner":"saasquatch","description":"Thin wrapper around Apache HttpAsyncClient 5.x to expose Reactive Streams interfaces.","archived":false,"fork":false,"pushed_at":"2024-07-04T19:12:11.000Z","size":150,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-11T10:18:57.955Z","etag":null,"topics":["apache","apache-httpclient","apache-httpcomponents","async","flowable","http","http-client","httpcomponents","httpcomponents-client","java","reactive-streams","reactivex","rxjava"],"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/saasquatch.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-27T21:20:28.000Z","updated_at":"2021-11-22T18:13:31.000Z","dependencies_parsed_at":"2025-01-18T00:35:30.790Z","dependency_job_id":null,"html_url":"https://github.com/saasquatch/apache-client5-reactive","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/saasquatch/apache-client5-reactive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saasquatch%2Fapache-client5-reactive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saasquatch%2Fapache-client5-reactive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saasquatch%2Fapache-client5-reactive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saasquatch%2Fapache-client5-reactive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saasquatch","download_url":"https://codeload.github.com/saasquatch/apache-client5-reactive/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saasquatch%2Fapache-client5-reactive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33917183,"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-04T02:00:06.755Z","response_time":64,"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":["apache","apache-httpclient","apache-httpcomponents","async","flowable","http","http-client","httpcomponents","httpcomponents-client","java","reactive-streams","reactivex","rxjava"],"created_at":"2024-11-17T05:13:06.666Z","updated_at":"2026-06-04T19:31:21.593Z","avatar_url":"https://github.com/saasquatch.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apache-client5-reactive\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![JavaCI](https://github.com/saasquatch/apache-client5-reactive/actions/workflows/JavaCI.yml/badge.svg?branch=master)](https://github.com/saasquatch/saasquatch-java-sdk/actions/workflows/JavaCI.yml)\n[![](https://jitpack.io/v/saasquatch/apache-client5-reactive.svg)](https://jitpack.io/#saasquatch/apache-client5-reactive)\n\nThin wrapper around [Apache HttpComponents](https://hc.apache.org/) HttpAsyncClient 5.x to expose [Reactive Streams](https://www.reactive-streams.org) interfaces.\n\n## Sample usage\n\n```java\nimport static java.nio.charset.StandardCharsets.UTF_8;\n\nimport com.saasquatch.client5reactive.HttpReactiveClient;\nimport com.saasquatch.client5reactive.HttpReactiveClients;\nimport io.reactivex.rxjava3.core.Single;\nimport java.nio.ByteBuffer;\nimport org.apache.hc.client5.http.async.methods.SimpleRequestBuilder;\nimport org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;\nimport org.apache.hc.client5.http.impl.async.HttpAsyncClients;\n\npublic class Example {\n\n  public static void main(String[] args) throws Exception {\n    // Create a CloseableHttpAsyncClient first\n    try (CloseableHttpAsyncClient asyncClient = HttpAsyncClients.createDefault()) {\n      /*\n       * HttpReactiveClient does not support lifecycle management, so the underlying\n       * CloseableHttpAsyncClient needs to be started and closed.\n       */\n      asyncClient.start();\n      // HttpReactiveClient is just a thin wrapper\n      final HttpReactiveClient reactiveClient = HttpReactiveClients.create(asyncClient);\n      // Execute a simple in-memory request\n      Single.fromPublisher(\n              reactiveClient.execute(SimpleRequestBuilder.get(\"https://www.example.com\").build()))\n          .doOnSuccess(response -\u003e {\n            // Get the response status and body in memory\n            System.out.println(response.getCode());\n            System.out.println(response.getBodyText());\n          })\n          .blockingSubscribe();\n      System.out.println(\"----------\");\n      // Execute a streaming request\n      // In this case, the request is a simple in-memory request without a request body\n      Single.fromPublisher(reactiveClient.streamingExecute(\n              SimpleRequestBuilder.get(\"https://www.example.com\").build()))\n          .flatMapPublisher(message -\u003e {\n            // Get the status before subscribing to the streaming body\n            System.out.println(message.getHead().getCode());\n            return message.getBody();\n          })\n          // Collect the streaming body chunks into a List\n          .toList()\n          .map(byteBuffers -\u003e {\n            // Concatenate the body chunks and decode with UTF-8\n            final int totalLength = byteBuffers.stream().mapToInt(ByteBuffer::remaining).sum();\n            final ByteBuffer combined = ByteBuffer.allocate(totalLength);\n            byteBuffers.forEach(combined::put);\n            combined.flip();\n            return UTF_8.decode(combined).toString();\n          })\n          .doOnSuccess(System.out::println)\n          .blockingSubscribe();\n    }\n  }\n\n}\n```\n\nThe source code is in package [`com.saasquatch.client5reactive.examples`](https://github.com/saasquatch/apache-client5-reactive/tree/master/src/test/java/com/saasquatch/client5reactive/examples).\n\n## Adding it to your project\n\n### Add the repository\n\nMaven\n\n```xml\n\u003crepositories\u003e\n  \u003crepository\u003e\n    \u003cid\u003ejitpack.io\u003c/id\u003e\n    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n  \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\nGradle\n\n```gradle\nrepositories {\n  maven { url 'https://jitpack.io' }\n}\n```\n\n### Add the dependency\n\nMaven\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.saasquatch\u003c/groupId\u003e\n  \u003cartifactId\u003eapache-client5-reactive\u003c/artifactId\u003e\n  \u003cversion\u003e0.0.7\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nGradle\n\n```gradle\nimplementation 'com.github.saasquatch:apache-client5-reactive:0.0.7'\n```\n\n## License\n\nUnless explicitly stated otherwise all files in this repository are licensed under the Apache License 2.0.\n\nLicense boilerplate:\n\n```\nCopyright 2023 ReferralSaaSquatch.com, Inc.\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%2Fsaasquatch%2Fapache-client5-reactive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaasquatch%2Fapache-client5-reactive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaasquatch%2Fapache-client5-reactive/lists"}