I wasn't expecting but it is solved with missing boundary information. These can be used:
const result = await axios({
url: 'https://api-m.sandbox.paypal.com/v1/customer/disputes/12345/send-message',
method: 'post',
data: form,
headers: {
'Content-Type': `multipart/form-data; boundary=${form._boundary}`,
Authorization: 'Bearer --token--'
}
})
or
const result = await axios({
url: 'https://api-m.sandbox.paypal.com/v1/customer/disputes/12345/send-message',
method: 'post',
data: form,
headers: {
Authorization: 'Bearer --token--',
...form.getHeaders()
}
})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…