Skip to content

Instantly share code, notes, and snippets.

@hugoalmeidahh
Created May 24, 2018 13:34
Show Gist options
  • Save hugoalmeidahh/712e847d4706ae83a58bc9f1a9a403eb to your computer and use it in GitHub Desktop.
Save hugoalmeidahh/712e847d4706ae83a58bc9f1a9a403eb to your computer and use it in GitHub Desktop.
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