axiosはヘッダを持つときのポストを要求、取得します

ヘッダーを含むポスト要求axios:

    axios.post( "http://xxx.com/xxx/xxx/xxx?"、{ 'queslistid':this.kemuid}、{ヘッダー:{ 'トークン')Cookies.get( 'トークン'、「プラットフォーム「: 'ウェブ'}} 
    ).then((ログイン)=> { 
      にconsole.log(ログイン)
    })。

  

axiosヘッダで要求を取得します:

    axios.get( "http://xxx.com/xxx/?"、{paramsは:{ID:this.kemuid}、ヘッダー:{トークン:Cookies.get( 'トークン')、プラットフォーム: 'ウェブ'}} 
    ).then((RES)=> { 
      にconsole.log(RES); 
    });

  

おすすめ

転載: www.cnblogs.com/wolfocme110/p/12075355.html