{"id":18026816,"url":"https://github.com/yegor256/cactoos-http","last_synced_at":"2025-08-03T09:08:57.103Z","repository":{"id":57739046,"uuid":"127726025","full_name":"yegor256/cactoos-http","owner":"yegor256","description":"Object-Oriented HTTP Client","archived":false,"fork":false,"pushed_at":"2025-03-31T04:01:59.000Z","size":226,"stargazers_count":38,"open_issues_count":26,"forks_count":28,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-02T07:58:29.329Z","etag":null,"topics":["elegantobjects","http","java","object-oriented-programming"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yegor256.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2018-04-02T08:13:23.000Z","updated_at":"2025-02-12T15:27:25.000Z","dependencies_parsed_at":"2022-08-24T17:51:23.630Z","dependency_job_id":"1ceb9c87-2c19-4444-9306-4a8059860686","html_url":"https://github.com/yegor256/cactoos-http","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fcactoos-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fcactoos-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fcactoos-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fcactoos-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yegor256","download_url":"https://codeload.github.com/yegor256/cactoos-http/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045245,"owners_count":21038554,"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","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":["elegantobjects","http","java","object-oriented-programming"],"created_at":"2024-10-30T08:08:09.361Z","updated_at":"2025-04-09T13:10:47.667Z","avatar_url":"https://github.com/yegor256.png","language":"Java","funding_links":[],"categories":["网络编程"],"sub_categories":["Spring Cloud框架"],"readme":"\u003cimg src=\"http://cf.jare.io/?u=http%3A%2F%2Fwww.yegor256.com%2Fimages%2Fbooks%2Felegant-objects%2Fcactus.svg\" height=\"100px\" /\u003e\n\n[![Donate via Zerocracy](https://www.0crat.com/contrib-badge/C63314D6Z.svg)](https://www.0crat.com/contrib/C63314D6Z)\n\n[![EO principles respected here](http://www.elegantobjects.org/badge.svg)](http://www.elegantobjects.org)\n[![Managed by Zerocracy](https://www.0crat.com/badge/C63314D6Z.svg)](https://www.0crat.com/p/C63314D6Z)\n[![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/cactoos-http)](http://www.rultor.com/p/yegor256/cactoos-http)\n[![We recommend IntelliJ IDEA](http://www.elegantobjects.org/intellij-idea.svg)](https://www.jetbrains.com/idea/)\n\n[![Build Status](https://travis-ci.org/yegor256/cactoos-http.svg?branch=master)](https://travis-ci.org/yegor256/cactoos-http)\n[![Javadoc](http://www.javadoc.io/badge/org.cactoos/cactoos-http.svg)](http://www.javadoc.io/doc/org.cactoos/cactoos-http)\n[![PDD status](http://www.0pdd.com/svg?name=yegor256/cactoos-http)](http://www.0pdd.com/p?name=yegor256/cactoos-http)\n[![Maven Central](https://img.shields.io/maven-central/v/org.cactoos/cactoos-http.svg)](https://maven-badges.herokuapp.com/maven-central/org.cactoos/cactoos-http)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/cactoos-http/blob/master/LICENSE.txt)\n\n[![Test Coverage](https://img.shields.io/codecov/c/github/yegor256/cactoos-http.svg)](https://codecov.io/github/yegor256/cactoos-http?branch=master)\n[![SonarQube](https://img.shields.io/badge/sonar-ok-green.svg)](https://sonarcloud.io/dashboard?id=org.cactoos%3Acactoos-http)\n\nCactoos-HTTP is a experimental HTTP client, fully object-oriented.\n\nThese are the [design principles](http://www.elegantobjects.org#principles) behind Cactoos-HTTP.\n\nAll you need is this:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eorg.cactoos\u003c/groupId\u003e\n  \u003cartifactId\u003ecactoos-http\u003c/artifactId\u003e\n  \u003cversion\u003e\u003c!-- Get it here: https://github.com/yegor256/cactoos-http/releases --\u003e\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nJava version required: 1.8+.\n\nStackOverflow tag is [cactoos](https://stackoverflow.com/questions/tagged/cactoos).\n\nWe are well aware of competitors\n(most likely they are more powerful than our client, but less object-oriented):\n\n  * [JDK HTTP Client](https://developer.oracle.com/java/jdk-http-client)\n  * [Apache HttpClient](https://hc.apache.org/httpcomponents-client-ga/)\n  * [JCabi-Http](http://http.jcabi.com)\n  * [Google HTTP Java Client](https://github.com/google/google-http-java-client)\n  * [Unirest](http://unirest.io/java.html)\n  * [OkHttp](http://square.github.io/okhttp/)\n\n## How to use\n\n`Ht` stands for `HTTP`. We are not using `Http` just in order to look\na bit different than all other libraries.\n\nTo make a simple HTTP GET request and read its body:\n\n```java\nString body = new TextOf(\n  new HtBody(\n    new HtResponse(\n      \"http://www.google.com\"\n    )\n  )\n).asString();\n```\n\nThis one sends a PUT request with a multi-part form and\nreads back some headers and the response code (mind the usage of `StickyInput`):\n\n```java\nInput head = new StickyInput(\n  new HtHead(\n    new HtResponse(\n      new HtWire(\"www.example.com\"),\n      new Joined(\n        \"\\n\\r\",\n        \"PUT / HTTP/1.1\",\n        \"Host: www.example.com\"\n      ).asString()\n    )\n  )\n);\nint status = new HtStatus(head).intValue();\nMap\u003cString, String\u003e headers = new HtHeaders(head);\n```\n\n## Questions\n\nAsk your questions related to cactoos library on [Stackoverflow](https://stackoverflow.com/questions/ask) with [cactoos](https://stackoverflow.com/tags/cactoos/info) tag.\n\n## How to contribute?\n\nJust fork the repo and send us a pull request.\n\nMake sure your branch builds without any warnings/issues:\n\n```\nmvn clean install -Pqulice\n```\n\n## License (MIT)\n\nCopyright (c) 2018 Yegor Bugayenko\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Fcactoos-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyegor256%2Fcactoos-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Fcactoos-http/lists"}