https://github.com/voronchuk/utils_http
Utilities to work with HTTP in Elixir
https://github.com/voronchuk/utils_http
elixir http utilities
Last synced: 7 months ago
JSON representation
Utilities to work with HTTP in Elixir
- Host: GitHub
- URL: https://github.com/voronchuk/utils_http
- Owner: Voronchuk
- License: mit
- Created: 2020-06-26T12:41:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-09T10:45:04.000Z (over 5 years ago)
- Last Synced: 2024-10-31T05:42:35.461Z (over 1 year ago)
- Topics: elixir, http, utilities
- Language: Elixir
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# utils_http
Utilities to work with HTTP in Elixir
Currently it's work in progress for internal usage, missing tests, use at your own risk.
You could implement your own http client for `@behaviour HttpClient`
or use default `UtilsHttp.Client.HTTPoison` implementation
## Example of usage with default HTTPoison implementation
```elixir
defmodule ExampleLib.HttpClient do
@moduledoc """
Utility wrapper for making HTTP requests.
Delegates to the configured HTTP client module.
"""
use UtilsHttp.Behaviour.HttpClient, http_client: UtilsHttp.Client.HTTPoison
end
```
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `utils_http` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:utils_http, "~> 0.1.0"}
]
end
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/utils_http](https://hexdocs.pm/utils_http).