JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6533
  • Score
    100M100P100Q128529F
  • License MIT

Tiny library for making http(s) requests.

Package Exports

  • tinyreq

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tinyreq) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

tinyreq

tinyreq PayPal Version Downloads Get help on Codementor

Tiny library for making http(s) requests.

☁️ Installation

$ npm i --save tinyreq

💡 ProTip: You can install the cli version of this module by running npm i -g tinyreq-cli

📋 Example

// Dependencies
var TinyReq = require("tinyreq");

// Make a request to example.com
TinyReq("http://example.com/", function (err, body) {
    console.log(err || body);
});

📝 Documentation

tinyreq(options, callback)

Creates http(s) requests.

Params

  • String|Object options: A string being the request url or an object containing the following fields:
  • url (String): The request url.
  • method (String): The request method.
  • data (Object): The request POST data.
  • Function callback: The callback function called (with error and data parameters).

Return

  • EventEmitter An event emitter you can use for listening for the data, error and end events.

😋 How to contribute

Have an idea? Found a bug? See how to contribute.

💫 Where is this library used?

If you are using this library in one of your projects, add it in this list. ✨

  • github-colors—GitHub colors and file extensions mapping
  • jsonrequest—A tiny library for requesting and getting JSON resources.
  • tinyreq-cli—A cli tool for making http(s) requests. CLI for tinyreq.
  • wrabbit (by jillix)—Wrap scripts by providing the wrapping function.

📜 License

MIT © Ionică Bizău