https://github.com/ethiclab/http-get
Simple http request that returns a Promise
https://github.com/ethiclab/http-get
get http request
Last synced: 5 months ago
JSON representation
Simple http request that returns a Promise
- Host: GitHub
- URL: https://github.com/ethiclab/http-get
- Owner: ethiclab
- Created: 2019-08-09T09:33:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-09T12:38:11.000Z (over 6 years ago)
- Last Synced: 2025-03-17T22:43:02.462Z (about 1 year ago)
- Topics: get, http, request
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@ethiclab/http-get
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# http-get [](https://badge.fury.io/js/%40ethiclab%2Fhttp-get) [](https://travis-ci.com/ethiclab/http-get) [](https://codecov.io/gh/ethiclab/http-get)
npm install @ethiclab/http-get
# usage
```javascript
const get = require("@ethiclab/http-get")
global.XMLHttpRequest = require("@ethiclab/xmlhttprequest").XMLHttpRequest
get("https://www.google.com")
.then(function (res) {
console.log(res)
})
.catch(function (err, desc) {
console.log(err, desc)
})
```