Skip to content

Emacs Lisp HTTP library with a Rust backend

License

Notifications You must be signed in to change notification settings

rfaulhaber/reel

Repository files navigation

reel

THIS IS STILL A WORK IN PROGRESS

Rust-based HTTP implementation for Emacs.

Reel strives to be non-interactive HTTP library for Emacs.

Rationale

Emacs’s built-in url.el library is insufficient for a lot of uses and arcane to use, and other popular libraries either depend on url.el or curl.

My goal is to implement an HTTP client in Emacs that has a similar API to other programming languages. It shouldn’t use buffers excessively and it shouldn’t depend on the global environment for behavior.

Features

Basic HTTP requests

Multipart form requests with file data

Send requests through a proxy

Cookies and sessions

Asynchronous requests

Streaming

Goals

  • Basic synchronous HTTP requests
  • REST clients
  • REST server

Examples

Reel’s API is roughly based off of JavaScript’s fetch API.

;; GETs "https://example.com" synchronously
(reel "https://example.com")

A reel request returns a reel-response struct, with status, headers, and body slots.

;; makes a POST request with headers
(reel "https://example.com"
      :method "POST"
      :headers '(("Content-Type" . "application/json"))
      :body (json-serialize '(:id 123)))

:body can also be an alist for form submission. Will raise an error if the alist contains anything but strings:

(reel "https://example.com"
      :method "POST"
      :body '(("key" . "value"))

About

Emacs Lisp HTTP library with a Rust backend

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published