Open harishankards opened 6 years ago
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:
Maybe trying without https ??
http://localhost:3000/students
instead of
https://localhost:3000/students
I had same problem, Solved with vue.config.js
Hi, I'm using Vue-resource for making an HTTP get request. Below is my code:
I checked with postman, it gives the right response. But in browser, I get the below error response: