Axios post response is html

Asked By: Anonymous

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 is right ( “ok”) but in my and route post I receive an html in my and I do not understand why someone can explain me please? and how to get an”ok” in my

file .vue

let formData = new FormData();
                formData.append('connexion', this.customer);
                formData.append('product', this.product);

      'hosting/', formData)
                    .then(response=> {

file route

Route::post('hosting', ['uses' => '[email protected]']);

file controller

public function cart(Request $request)
    return 'ok';

my response when

my response when post

my response when axios.put

my response when put

thank’s all for your help!


Answered By: Anonymous

[UPDATE] I have finally resolved this issue by just remove “/” on my url POST

The reason of the POST which sent me an html message is that in the POST if the “/” it waits for something params then while in PUT it removes the “/” automatically because no params behind!'hosting', formData)
      .then(response=> {

really a silly mistake sorry. I put the answer to help other people.

techinplanet staff

techinplanet staff

Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno