mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-20 22:30:05 -06:00
Closes #785 Axios has a [known issue](https://github.com/axios/axios/issues/658) that causes requests to hang when accessing an HTTPS resource via a proxy served over HTTP. This changes out the axios dependency for the [request](https://github.com/request/request) library. In order to keep `async/await` conventions easy, I also dropped in the [request-promise-native](https://github.com/request/request-promise-native) dependency.
15 lines
239 B
JavaScript
15 lines
239 B
JavaScript
const request = require('request-promise-native')
|
|
|
|
module.exports = {
|
|
async get (uri) {
|
|
const reqOpts = {
|
|
method: 'GET',
|
|
resolveWithFullResponse: true,
|
|
json: true,
|
|
uri
|
|
}
|
|
|
|
return request(reqOpts)
|
|
}
|
|
}
|