Paypal UNSUPPORTED_MEDIA_TYPE
问题 I am trying to get an access token from paypal's authorization api. When I make post request to the api I get UNSUPPORTED_MEDIA_TYPE i.e. 415 response. Below is the snippet that I used. const auth = await fetch(PAYPAL_OAUTH_API, { method: 'post', headers: { 'Content-Type': 'application/json', 'Authorization': `Basic ${ basicAuth }` }, body: JSON.stringify({"grant_type": "client_credentials"}) }); 回答1: I have fixed my issue by setting Content-Type to application/x-www-form-urlencoded . My