/http

A janet http client library

Primary LanguageCMIT LicenseMIT

http

A janet http client

Install

Add to your project.janet file

{:dependencies ["https://github.com/joy-framework/http"]}

Use

(import http)

Send get requests!

(= @{:status 200 :body "..." :headers {"Content-Type" "text/html; charset=UTF-8" ...}}
   (http/get "example.com"))

... and post requests!

(http/post "example.com" "param1=value1&param2=value2")

follow redirects!

(http/get "httpstat.us/302" :follow-redirects true)

send custom http methods too!

*head, trace, delete, put, and patch supported

(http/delete "example.com/accounts/1")