1.0.1 • Published 5 years ago

@gowerstreet/fetch v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

Fetch

A simple convenience wrapper around Node.js's HTTP.get function. Takes a URL and a callback function.

If you need PUT, POST, DELETE, multi-part MIME uploads, or an of the rest of that jazz, you're better off using one of the many libraries like request.

Usage

(var fetch (require "@gowerstreet/fetch"))

(fetch "http://jsonplaceholder.typicode.com/todos/1"
       (# (data) (console.log "Look what I got!" (JSON.parse data))))

TODO

  • Support HTTPS
  • Handle errors better. Or at all.

License

MIT - see the license file.