Use https for API calls

This commit is contained in:
Sébastien Chopin 2016-11-27 19:26:42 +01:00
parent 53499f2a6b
commit 4f60d4250e
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ import axios from 'axios'
export default { export default {
data ({ params, error }) { data ({ params, error }) {
return axios.get(`http://jsonplaceholder.typicode.com/users/${params.id}`) return axios.get(`https://jsonplaceholder.typicode.com/users/${params.id}`)
.then((res) => res.data) .then((res) => res.data)
.catch(() => { .catch(() => {
error({ message: 'User not found', statusCode: 404 }) error({ message: 'User not found', statusCode: 404 })

View File

@ -14,7 +14,7 @@ import axios from 'axios'
export default { export default {
data () { data () {
return axios.get('http://jsonplaceholder.typicode.com/users') return axios.get('https://jsonplaceholder.typicode.com/users')
.then((res) => { .then((res) => {
return { users: res.data } return { users: res.data }
}) })