ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - peburrows/river: An HTTP/2 client for Elixir (a work in progress!)
An HTTP/2 client for Elixir (a work in progress!). Contribute to peburrows/river development by creating an account on GitHub.
Visit Site

GitHub - peburrows/river: An HTTP/2 client for Elixir (a work in progress!)

GitHub - peburrows/river: An HTTP/2 client for Elixir (a work in progress!)

Build Status

River

NOTE: River is a work in progress and should be considered extremely beta.

River 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:

  1. be fully compliant with RFC 7540
  2. be simple and straightforward to use, in the vein of HTTPoison
  3. be awesome, in the same way that Go's http library (which has built-in, transparent support for HTTP/2) is awesome.

Installation

  1. Add River to your list of dependencies in mix.exs:
def deps do
  [{:river, "~> 0.0.6"}]
end
  1. Ensure River is started before your application:
def application do
  [applications: [:river]]
end

Caveats

  1. 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.
  2. 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.
  3. 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)

Goals

  • Basic HTTP/2 support
  • HTTP/1 --> HTTP/2 upgrading
  • Full HTTP/2 support
  • Full HTTP/1.x support

Basic Usage

Simple GET

River.get("https://http2.golang.org/")
=> {:ok,
 %River.Response{__status: :ok,
  body: "<html>\n<body>\n<h1>Go...",
  closed: true, code: 200, content_type: "text/html; charset=utf-8",
  headers: headers: [{":status", "200"},
                     {"content-type", "text/html; charset=utf-8"},
                     {"content-length", "1708"},
                     {"date", "Fri, 30 Sep 2016 04:26:34 GMT"}]}}

Simple PUT

River.put("https://example.com/", "hello world")
=> {:ok, %River.Response{...}}

Request with timeout

# timeout unit is milliseconds
River.get("https://http2.golang.org/", timeout: 10)
=> {:error, :timeout}

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory