zoukankan      html  css  js  c++  java
  • VUE axios

    Axios 各种方法传递参数 Demo (整理一下,总是忘记。)
     

    get 和 delete 方法较为不同
     

    axios.get(url[, config])

    axios.delete(url[, config])

    axios.post(url[, data[, config]])

    axios.put(url[, data[, config]])

    axios.patch(url[, data[, config]])
    GET方法

    Axios.get('demo/url', {
    params: {
    id: 123,
    name: 'Henry',
    sex: 1,
    phone: 13333333
    }
    })
     

    DELETE方法

    Axios.delete('demo/url', {
    data: {
    id: 123,
    name: 'Henry',
    sex: 1,
    phone: 13333333
    }
    })
     

    POST方法

    Axios.post('demo/url', {
    id: 123,
    name: 'Henry',
    sex: 1,
    phone: 13333333
    })
     

    PUT方法

    Axios.put('demo/url', {
    id: 123,
    name: 'Henry',
    sex: 1,
    phone: 13333333
    })
     

    PATCH方法

    Axios.patch('demo/url', {
    id: 123,
    name: 'Henry',
    sex: 1,
    phone: 1333333

    })

     
  • 相关阅读:
    iptables
    apt
    cvc-elt.1: Cannot find the declaration of element 'beans'.
    di
    log
    java内存模型
    spring-jms
    JTS
    10java进阶——IO2
    17单例
  • 原文地址:https://www.cnblogs.com/xzhce/p/12910897.html
Copyright © 2011-2022 走看看