axios delete

參考: https://stackoverflow.com/questions/51069552/axios-delete-request-with-body-and-headers

 

function stopFollowAuthor(authorname) {
    const requestOptions = {
        headers: Object.assign({}, authHeader(), {'Content-Type': 'application/json' }),
        data: JSON.stringify({authorname})
    }
    // const postData = JSON.stringify({data: {authorname}})
    return https.delete(urls.followAuthor, requestOptions)
}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章