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)
}

 

你可能感兴趣的:(JavaScript)