{"id":13508331,"url":"https://github.com/peburrows/river","last_synced_at":"2025-03-30T11:31:41.544Z","repository":{"id":57544329,"uuid":"65862153","full_name":"peburrows/river","owner":"peburrows","description":"An HTTP/2 client for Elixir (a work in progress!)","archived":false,"fork":false,"pushed_at":"2018-12-15T20:21:20.000Z","size":185,"stargazers_count":82,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-09T08:02:53.065Z","etag":null,"topics":["elixir","http","http-2","http2"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/peburrows.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}},"created_at":"2016-08-17T00:08:21.000Z","updated_at":"2023-09-01T08:27:08.000Z","dependencies_parsed_at":"2022-09-16T23:02:06.882Z","dependency_job_id":null,"html_url":"https://github.com/peburrows/river","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peburrows%2Friver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peburrows%2Friver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peburrows%2Friver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peburrows%2Friver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peburrows","download_url":"https://codeload.github.com/peburrows/river/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314011,"owners_count":20757450,"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":["elixir","http","http-2","http2"],"created_at":"2024-08-01T02:00:51.541Z","updated_at":"2025-03-30T11:31:41.083Z","avatar_url":"https://github.com/peburrows.png","language":"Elixir","readme":"[![Build Status](https://travis-ci.org/peburrows/river.svg?branch=master)](https://travis-ci.org/peburrows/river)\n\n# River\n\n**NOTE: River is a work in progress and should be considered _extremely_ beta.**\n\nRiver is a general-purpose HTTP client with eventual hopes of full HTTP/2 support (along with support for HTTP/1.1). It is built from the ground up with three major goals:\n\n1. be fully compliant with [RFC 7540](http://httpwg.org/specs/rfc7540.html)\n2. be simple and straightforward to use, in the vein of HTTPoison\n3. be awesome, in the same way that Go's http library (which has built-in, transparent support for `HTTP/2`) is awesome.\n\n## Installation\n\n1. Add River to your list of dependencies in `mix.exs`:\n```elixir\ndef deps do\n  [{:river, \"~\u003e 0.0.6\"}]\nend\n```\n\n2. Ensure River is started before your application:\n```elixir\ndef application do\n  [applications: [:river]]\nend\n```\n\n## Caveats\n\n1. Currently, River only knows how to make `HTTP/2` requests to `https://` endpoints. Soon, I'll add the ability to make a request via the Upgrade header so that requests to `http://` endpoints will work as well.\n2. River doesn't currently speak `HTTP/1.x`. Once I finish up basic `HTTP/2` support, `HTTP1.x` is next on the roadmap. The goal when using River in your project is that you should not need to know whether the underlying connection is using `HTTP/2` or `HTTP/1.x`.\n3. River is as beta as it gets, and under active development with no promises of anything being backwards compatible 😬 (until we hit `v1.0`, of course)\n\n## Goals\n\n- [x] Basic HTTP/2 support\n- [ ] HTTP/1 --\u003e HTTP/2 upgrading\n- [ ] Full HTTP/2 support\n- [ ] Full HTTP/1.x support\n\n## Basic Usage\n\n#### Simple GET\n```elixir\nRiver.get(\"https://http2.golang.org/\")\n=\u003e {:ok,\n %River.Response{__status: :ok,\n  body: \"\u003chtml\u003e\\n\u003cbody\u003e\\n\u003ch1\u003eGo...\",\n  closed: true, code: 200, content_type: \"text/html; charset=utf-8\",\n  headers: headers: [{\":status\", \"200\"},\n                     {\"content-type\", \"text/html; charset=utf-8\"},\n                     {\"content-length\", \"1708\"},\n                     {\"date\", \"Fri, 30 Sep 2016 04:26:34 GMT\"}]}}\n```\n\n#### Simple PUT\n```elixir\nRiver.put(\"https://example.com/\", \"hello world\")\n=\u003e {:ok, %River.Response{...}}\n```\n\n#### Request with timeout\n```elixir\n# timeout unit is milliseconds\nRiver.get(\"https://http2.golang.org/\", timeout: 10)\n=\u003e {:error, :timeout}\n```\n","funding_links":[],"categories":["HTTP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeburrows%2Friver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeburrows%2Friver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeburrows%2Friver/lists"}