Good morning all,
i use: "laravel/framework": "^6.2",
"axios": "^0.19",
"vue": "^2.5.17",
I have a problem when I use a axios.put and route put my response.data is right (response.data: "ok") but in my axios.post and route post I receive an html in my response.data and I do not understand why someone can explain me please? and how to get an reponse.data:"ok" in my axios.post?
file .vue
let formData = new FormData();
formData.append('connexion', this.customer);
formData.append('product', this.product);
axios.post('hosting/', formData)
.then(response=> {
console.log(response);
});
file route
Route::post('hosting', ['uses' => 'Api\HostingController@cart']);
file controller
public function cart(Request $request)
{
return 'ok';
}
my response when axios.post
my response when axios.put
thank's all for your help!