{"id":13741195,"url":"https://github.com/gleam-lang/hackney","last_synced_at":"2025-07-21T09:33:13.766Z","repository":{"id":43678215,"uuid":"441927003","full_name":"gleam-lang/hackney","owner":"gleam-lang","description":"🪝 Make requests to HTTP servers with Hackney","archived":false,"fork":false,"pushed_at":"2025-02-06T12:04:30.000Z","size":33,"stargazers_count":49,"open_issues_count":3,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-12T14:56:45.371Z","etag":null,"topics":["erlang","gleam","http-client"],"latest_commit_sha":null,"homepage":"","language":"Gleam","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/gleam-lang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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},"funding":{"github":["lpil"],"liberapay":"gleam"}},"created_at":"2021-12-26T15:46:54.000Z","updated_at":"2025-07-10T12:53:30.000Z","dependencies_parsed_at":"2024-04-19T16:02:48.820Z","dependency_job_id":null,"html_url":"https://github.com/gleam-lang/hackney","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/gleam-lang/hackney","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleam-lang%2Fhackney","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleam-lang%2Fhackney/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleam-lang%2Fhackney/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleam-lang%2Fhackney/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gleam-lang","download_url":"https://codeload.github.com/gleam-lang/hackney/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleam-lang%2Fhackney/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265071736,"owners_count":23706841,"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":["erlang","gleam","http-client"],"created_at":"2024-08-03T04:00:56.562Z","updated_at":"2025-07-21T09:33:13.749Z","avatar_url":"https://github.com/gleam-lang.png","language":"Gleam","funding_links":["https://github.com/sponsors/lpil","https://liberapay.com/gleam"],"categories":["Packages","Gleam"],"sub_categories":["HTTP Clients"],"readme":"# Hackney\n\n\u003ca href=\"https://github.com/gleam-lang/hackney/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/gleam-lang/hackney\" alt=\"GitHub release\"\u003e\u003c/a\u003e\n\u003ca href=\"https://discord.gg/Fm8Pwmy\"\u003e\u003cimg src=\"https://img.shields.io/discord/768594524158427167?color=blue\" alt=\"Discord chat\"\u003e\u003c/a\u003e\n\nBindings to Erlang's `hackney` HTTP client.\n\n```gleam\nimport gleam/result.{try}\nimport gleam/hackney\nimport gleam/http.{Get}\nimport gleam/http/request\nimport gleam/http/response\nimport gleeunit/should\n\npub fn main() {\n  // Prepare a HTTP request record\n  let assert Ok(request) =\n    request.to(\"https://test-api.service.hmrc.gov.uk/hello/world\")\n\n  // Send the HTTP request to the server\n  use response \u003c- try(\n    request\n    |\u003e request.prepend_header(\"accept\", \"application/vnd.hmrc.1.0+json\")\n    |\u003e hackney.send\n  )\n\n  // We get a response record back\n  response.status\n  |\u003e should.equal(200)\n\n  response\n  |\u003e response.get_header(\"content-type\")\n  |\u003e should.equal(Ok(\"application/json\"))\n\n  response.body\n  |\u003e should.equal(\"{\\\"message\\\":\\\"Hello World\\\"}\")\n\n  Ok(response)\n}\n```\n\n## Installation\n\n```shell\ngleam add gleam_hackney\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgleam-lang%2Fhackney","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgleam-lang%2Fhackney","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgleam-lang%2Fhackney/lists"}