vue-resource icon indicating copy to clipboard operation
vue-resource copied to clipboard

HTTP req response throws net::ERR_CONNECTION_CLOSED

Open harishankards opened this issue 6 years ago • 2 comments

Hi, I'm using Vue-resource for making an HTTP get request. Below is my code:

    mounted () {
      this.$http.get('https://localhost:3000/students', { headers: { 'content-type': 'application/json' } })
      .then(function (data) {
        console.log('data', data)
      })
      .catch(function (err) {
        console.log('err', err)
      })
    }

I checked with postman, it gives the right response. But in browser, I get the below error response: image

harishankards avatar Apr 17 '18 04:04 harishankards

Maybe trying without https ??

http://localhost:3000/students

instead of

https://localhost:3000/students

msouidi309 avatar May 23 '18 13:05 msouidi309

I had same problem, Solved with vue.config.js

Hedoo avatar Dec 02 '21 04:12 Hedoo