Skip to content

Repository files navigation

fetch.el

Goals

  • Simple, discoverable API
  • Reduce boilerplate

Installing

Using Straight.el

(straight-use-package
'(fetch :type git :host github :repo"ebpa/fetch.el":files ("*.el")))

Usage

Basic synchronous usage

(fetch "https://www.gnu.org/software/emacs")

Asynchronous (callback)

(fetch "https://www.gnu.org/software/emacs":callback (lambda (response)
(message"The response status code is %d" (fetch-response-status-code response))))

Asynchronous (promise.el)

(promise-chain
(fetch "https://www.gnu.org/software/emacs":promiset)
(then #'fetch-html)
(then (lambda (html)
(message"%s" html))))

Alternatives / Related Projects

About

A simple HTTP request library modeled after the web browser API

Resources

Stars

4 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages