0.12.0 • Published 5 years ago

@r-ui/fetch v0.12.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

@r-ui/fetch

Fetch url contents.

Install

npm install @r-ui/fetch

Fetch from URL

fetch(options)

Where

  • options is an options object

Example

var fetch = require("fetch");

fetch({
    url: "http://localhost/"
});

Options

Possible option values

  • headers optional header fields, in the form of {'Header-Field':'value'}
  • method defaults to GET
  • url defaults to an empty string
  • data is an optional data object

Headers

Request headers can be set with options.headers

options = {
    headers:{
        "X-My-Header": "This is a custom header field"
    }
}

User-Agent

User-Agent value can be set with options.headers['User-Agent'] value.

options = {
    headers: {
        "User-Agent": "MyUseragent/1.0"
    }
}

License

MIT

0.12.0

5 years ago

0.11.0

5 years ago

0.10.0

5 years ago

0.9.0

5 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.6.0-beta.2

5 years ago

0.6.0-beta.1

5 years ago

0.6.0-beta

5 years ago

0.5.0

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.3.0-beta.1

5 years ago

0.3.0-beta

5 years ago

0.2.0

5 years ago

0.2.0-beta

5 years ago

0.1.0

5 years ago

0.1.0-beta.2

5 years ago

0.1.0-beta.1

5 years ago

0.1.0-beta

5 years ago