{"id":21898892,"url":"https://github.com/mgunawardhana/call-rest-api-using-web-client","last_synced_at":"2026-04-22T23:35:27.694Z","repository":{"id":232399123,"uuid":"784232160","full_name":"mgunawardhana/call-rest-api-using-web-client","owner":"mgunawardhana","description":"This Java package demonstrates how to call a REST API using the Spring WebFlux WebClient.","archived":false,"fork":false,"pushed_at":"2024-05-19T15:17:56.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-05T13:26:28.556Z","etag":null,"topics":["external-api","java","rest-api","spring-boot","webflux"],"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/mgunawardhana.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-09T12:56:29.000Z","updated_at":"2024-05-19T15:18:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"e133f763-c5fb-4d81-898c-d04862d9291d","html_url":"https://github.com/mgunawardhana/call-rest-api-using-web-client","commit_stats":null,"previous_names":["mgunawardhana/call-rest-api-using-web-client","anonymous-leviathan/call-rest-api-using-web-client"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mgunawardhana/call-rest-api-using-web-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgunawardhana%2Fcall-rest-api-using-web-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgunawardhana%2Fcall-rest-api-using-web-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgunawardhana%2Fcall-rest-api-using-web-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgunawardhana%2Fcall-rest-api-using-web-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgunawardhana","download_url":"https://codeload.github.com/mgunawardhana/call-rest-api-using-web-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgunawardhana%2Fcall-rest-api-using-web-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32159959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T17:06:48.269Z","status":"ssl_error","status_checked_at":"2026-04-22T17:06:19.037Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["external-api","java","rest-api","spring-boot","webflux"],"created_at":"2024-11-28T14:35:21.784Z","updated_at":"2026-04-22T23:35:27.670Z","avatar_url":"https://github.com/mgunawardhana.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Call REST API Using WebClient\n\nThis Java package demonstrates how to call a REST API using the Spring WebFlux `WebClient`.\n\n## Introduction\n\nThis project provides a simple example of how to make HTTP requests to a REST API using the `WebClient` class provided by the Spring Framework. It fetches data from the [Fake Store API](https://fakestoreapi.com/) and demonstrates how to handle both a list of products and a single product response.\n\n## Dependencies\n\nThis project requires:\n\n- Java Development Kit (JDK) version 8 or higher\n- Spring Boot\n- Lombok\n\n## Usage\n\n1. Clone this repository to your local machine.\n2. Build the project using your preferred IDE or build tool.\n3. Run the `CallRestApiUsingWebClientApplication` class.\n4. The application will fetch a list of products from the Fake Store API and log the response.\n5. It will also fetch a single product with ID 1 and log the response.\n\n## Code Explanation\n\n- The `main` method in the `CallRestApiUsingWebClientApplication` class initializes a Spring Boot application.\n- It uses `WebClient.Builder` to create a `WebClient` instance.\n- The first request fetches a list of products from the specified URI and logs the response.\n- The second request fetches a single product with ID 1 and logs the response.\n\n## Further Information\n\nFor more details about Spring WebFlux and `WebClient`, please refer to the [official documentation](https://docs.spring.io/spring-framework/reference/web/webflux.html).\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgunawardhana%2Fcall-rest-api-using-web-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgunawardhana%2Fcall-rest-api-using-web-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgunawardhana%2Fcall-rest-api-using-web-client/lists"}