0๐
โ
I removed the auth section and it worked! The auth section was this:
auth: {
username: "username",
password: "password"
}
0๐
you can add header object
methods: { submitEmail() { axios
.post(
"https://my_api.com/registrations?access_token=my_api_key"
{
language: this.language,
user_email: this.postEmail,
auth: {
username: "username",
password: "password"
}
},
{ headers: { 'Content-Type': 'application/json', 'Authorization': 'JWT fefege...' } } ) .then(response => { // console.log(response); }) .catch(function(error) {}); } }
Source:stackexchange.com