Created
May 24, 2018 13:34
-
-
Save hugoalmeidahh/712e847d4706ae83a58bc9f1a9a403eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
methods: { | |
api(lat, lng, km){ | |
this.loading = true; | |
var payload = this.payAuth; | |
var token = ""; | |
var urlAuth = 'http://localhost:49921/token'; | |
return new Promise((resolve, reject) => { | |
axios.post(urlAuth, JSON.stringify(payload), | |
{withCredentials: true, headers: {'Content-Type': 'application/x-www-form-urlencoded'}}).then(response => { | |
resolve(response.data) | |
}, error => { | |
reject(error); | |
}) | |
}) | |
}, | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment