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

https://github.com/hellerve/simplereq

A native extension for zepto that empowers you to make requests easily
https://github.com/hellerve/simplereq

Last synced: 12 months ago
JSON representation

A native extension for zepto that empowers you to make requests easily

Awesome Lists containing this project

README

          

# simplereq

A zepto native extension that wraps the Haskell `wreq` package
to make simple http and https requests. It is in alpha.

## Installation

```
zeps install hellerve/simplereq
```

## Usage

simplereq exposes the REST verbs and a generic verb function.
You can see it in action below:

```clojure
(load "simplereq/simplereq")
(import-all "simplereq")

(simplereq:get "https://httpbin.org/get")
(simplereq:post "https://httpbin.org/post" "hi httpbin")
(simplereq:put "https://httpbin.org/put" "hi httpbin")
(simplereq:delete "https://httpbin.org/delete")
(simplereq:request "patch" "https://httpbin.org/patch" "hi httpbin")
```

All of these methods return hashmaps with the keys `:status`, `:headers` and
`:body`.

Sadly, you can not yet mess with the request headers or cookies.


Have fun!