Skip to main content

Interessante Bibliotheken

HTTP-Requests / JSON

Bibliotheken

  • tesla - HTTP client library, with support for middleware and multiple adapters (hex, hexdocs, Github)
  • httpoison - Yet Another HTTP client for Elixir powered by hackney (hex, Github)

Beispiele

tesla
defmodule DatesAPI do
  use Tesla

  plug Tesla.Middleware.BaseUrl, "https://api.datesapi.net"
  plug Tesla.Middleware.JSON

  def get_next_month() do
    get("/next-month")
  end
end
httpoison
"https://api.datesapi.net/today"
|> HTTPoison.get!()
|> Map.get(:body)
|> Poison.decode!()
|> Map.get("result")

JSON

Bibliotheken

  • jason - A blazing fast JSON parser and generator in pure Elixir (hex, Github)
  • poison - An incredibly fast, pure Elixir JSON library (hex, Github)

Job scheduler

Bibliotheken