Skip to content
/ fetch.el Public

A simple HTTP request library modeled after the web browser API

Notifications You must be signed in to change notification settings

ebpa/fetch.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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" :promise t)
  (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

Watchers

Forks

Releases

No releases published

Packages

No packages published