0๐
โ
I have found answer on Github
Yes, StringClient uses the application/x-www-form-urlencoded format by default while axios uses application/json by default (when data is an Object).
So current implementation looks like this
var params = new URLSearchParams();
params.append('name', this.name);
params.append('email', this.email);
params.append('subject', this.subject);
params.append('message', this.message);
this.$http.post(this.$apiUrl + `rest/api/public/Contact/Contact`, params, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
}
})
Source:stackexchange.com