婷婷久久综合九色综合,欧美成色婷婷在线观看视频,偷窥视频一区,欧美日本一道道一区二区

<tt id="bu9ss"></tt>
  • <span id="bu9ss"></span>
  • <pre id="bu9ss"><tt id="bu9ss"></tt></pre>
    <label id="bu9ss"></label>

    當前位置:首頁 >  站長 >  編程技術 >  正文

    關于axios請求——delete方法

     2020-11-05 15:17  來源: 田珊珊個人博客   我來投稿 撤稿糾錯

      阿里云優(yōu)惠券 先領券再下單

    有的人只知道delete方法,傳值的時候,將請求值放在url上,而像post方法那些,帶有請求體,卻不知道該如果傳值。

    首先,delete方法有三種寫法

    一:請求參數拼接在url上

    axios.delete('/delete', {

    params: { // 請求參數拼接在url上

    id: 12

    }

    }).then(res => {

    console.log(res)

    })

    二:請求參數放在請求體

    axios.delete('/delete', {

    data: { // 請求參數放在請求體

    id: 12

    }

    }).then(res => {

    console.log(res)

    })

    三:請求參數拼接在url上或請求參數放在請求體

    axios({

    method: 'delete',

    url: '/delete',

    params: {}, // 請求參數拼接在url上

    data: {} // 請求參數放在請求體

    }).then(res => {

    console.log(res)

    })

    文章來源:田珊珊個人博客

    來源地址:http://www.tianshan277.com/796.html

    申請創(chuàng)業(yè)報道,分享創(chuàng)業(yè)好點子。點擊此處,共同探討創(chuàng)業(yè)新機遇!

    相關文章

    熱門排行

    信息推薦