Packages

An HTTP client for Pooka, using Erlang's httpc

Current section

Files

Jump to
pooka_httpc README.md
Raw

README.md

# httpc

[![Package Version](https://img.shields.io/hexpm/v/pooka_httpc?style=for-the-badge&color=75618E)](https://hex.pm/packages/pooka_httpc)
[![Hex Docs](https://img.shields.io/website?url=https%3A%2F%2Fpooka-httpc.hexdocs.pm%2F&style=for-the-badge&label=hex&up_message=docs&up_color=FF891F&down_message=not%20found&down_color=lightgrey)](https://pooka-httpc.hexdocs.pm/)
[![Tests](https://img.shields.io/github/actions/workflow/status/pooka-lang/httpc/test.yml?style=for-the-badge&label=tests)](https://github.com/pooka-lang/httpc/actions/workflows/test.yml)

An HTTP client for Pooka, using Erlang's httpc.

```sh
pooka add pooka_httpc
```

```pooka
import pooka/httpc

let assert Ok(reply) = httpc.get("https://example.org/")
echo reply.status
```

TLS verification is enabled and redirects stay visible by default. Non-success HTTP statuses are responses, not transport failures. Uses `pooka/http` requests and responses; bodies are supported for POST, PUT and PATCH.

See the [API documentation](https://pooka-httpc.hexdocs.pm/) for the rest.

## Licence

Licensed under the [Apache License, Version 2.0](LICENSE).