Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/violetbuse/httpp

A gleam http client with support for server-sent events and long-running requests, based on hackney
https://github.com/violetbuse/httpp

erlang gleam gleam-community

Last synced: about 1 month ago
JSON representation

A gleam http client with support for server-sent events and long-running requests, based on hackney

Awesome Lists containing this project

README

        

# httpp

[![Package Version](https://img.shields.io/hexpm/v/httpp)](https://hex.pm/packages/httpp)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/httpp/)

```sh
gleam add httpp
```
```gleam
import httpp/async
import gleam/http/request
import gleam/uri
import gleam/bytes_builder
import gleam/erlang/process

pub fn main() {
let response_subject = uri.parse("https://example.com")
|> request.from_uri
|> request.map(bytes_builder.from_string)
|> async.send

// asynchronously send an http request and receive it later
process.receive(response_subject, 2000)
}
```

Further documentation can be found at .

## Development

```sh
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell
```