{"id":13784857,"url":"https://github.com/ZewoGraveyard/HTTPClient","last_synced_at":"2025-05-11T20:31:18.738Z","repository":{"id":98316236,"uuid":"51793787","full_name":"ZewoGraveyard/HTTPClient","owner":"ZewoGraveyard","description":"CSP (coroutine) based Swift HTTP+HTTPS client for macOS and Linux","archived":false,"fork":false,"pushed_at":"2016-11-27T16:32:42.000Z","size":45,"stargazers_count":19,"open_issues_count":1,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T22:02:09.135Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":false,"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/ZewoGraveyard.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":"2016-02-15T23:38:32.000Z","updated_at":"2022-01-21T08:15:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd0f2cd3-1947-49b2-980a-30426fa14359","html_url":"https://github.com/ZewoGraveyard/HTTPClient","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZewoGraveyard%2FHTTPClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZewoGraveyard%2FHTTPClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZewoGraveyard%2FHTTPClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZewoGraveyard%2FHTTPClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZewoGraveyard","download_url":"https://codeload.github.com/ZewoGraveyard/HTTPClient/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253631985,"owners_count":21939370,"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":[],"created_at":"2024-08-03T19:00:53.367Z","updated_at":"2025-05-11T20:31:17.896Z","avatar_url":"https://github.com/ZewoGraveyard.png","language":"Swift","funding_links":[],"categories":["Server Side Utilities"],"sub_categories":["Networking"],"readme":"# HTTPClient\n\n[![Swift][swift-badge]][swift-url]\n[![License][mit-badge]][mit-url]\n[![Slack][slack-badge]][slack-url]\n[![Travis][travis-badge]][travis-url]\n[![Codecov][codecov-badge]][codecov-url]\n[![Codebeat][codebeat-badge]][codebeat-url]\n\n## Installation\n\n```swift\nimport PackageDescription\n\nlet package = Package(\n    dependencies: [\n        .Package(url: \"https://github.com/Zewo/HTTPClient.git\", majorVersion: 0, minor: 14)\n    ]\n)\n```\n\n## Usage\n\n### Creating a client\n\n```swift\nlet client = try Client(url: \"http://httpbin.org\")\n```\n\n### Basic GET request\n\n```swift\nlet response = try client.get(\"/get\")\n```\n\n### POST request with JSON body\n\n```swift\nlet content: Map = [\n    \"hello\": \"world\",\n    \"numbers\": [1, 2, 3, 4, 5]\n]\nlet body = try JSONMapSerializer.serialize(content)\nlet response = try client.post(\"/post\", body: body)\n```\n\n### Parsing response body\n\n```swift\n// converts response to a common type `Map` from pool of types\nlet contentNegotiation = ContentNegotiationMiddleware(mediaTypes: [.json, .urlEncodedForm], mode: .client)\nlet response = try client.get(\"/get\", middleware: [contentNegotiation])\nprint(response.content)\n```\n\n## Support\n\nIf you need any help you can join our [Slack](http://slack.zewo.io) and go to the **#help** channel. Or you can create a Github [issue](https://github.com/Zewo/Zewo/issues/new) in our main repository. When stating your issue be sure to add enough details, specify what module is causing the problem and reproduction steps.\n\n## Community\n\n[![Slack][slack-image]][slack-url]\n\nThe entire Zewo code base is licensed under MIT. By contributing to Zewo you are contributing to an open and engaged community of brilliant Swift programmers. Join us on [Slack](http://slack.zewo.io) to get to know us!\n\n## License\n\nThis project is released under the MIT license. See [LICENSE](LICENSE) for details.\n\n[swift-badge]: https://img.shields.io/badge/Swift-3.0-orange.svg?style=flat\n[swift-url]: https://swift.org\n[mit-badge]: https://img.shields.io/badge/License-MIT-blue.svg?style=flat\n[mit-url]: https://tldrlegal.com/license/mit-license\n[slack-image]: http://s13.postimg.org/ybwy92ktf/Slack.png\n[slack-badge]: https://zewo-slackin.herokuapp.com/badge.svg\n[slack-url]: http://slack.zewo.io\n[travis-badge]: https://travis-ci.org/Zewo/HTTPClient.svg?branch=master\n[travis-url]: https://travis-ci.org/Zewo/HTTPClient\n[codecov-badge]: https://codecov.io/gh/Zewo/HTTPClient/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/Zewo/HTTPClient\n[codebeat-badge]: https://codebeat.co/badges/bc032b4e-3a28-413e-a71c-c7467ce24499\n[codebeat-url]: https://codebeat.co/projects/github-com-zewo-httpclient\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZewoGraveyard%2FHTTPClient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZewoGraveyard%2FHTTPClient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZewoGraveyard%2FHTTPClient/lists"}