415 code using httr and RCurl, but not just curl
I'm trying to write a function that handles some of the authentication for Spotify's API. I can get it to work with a fairly simple curl command, but when I try to use httr or RCurl, I get 415 Unsupported Media Type responses. I'm somewhat at a loss at this point. I've gotten POST() , and GET() to work with this API already, but this endpoint is not working. Using httr : response <- POST('https://accounts.spotify.com/api/token', accept_json(), add_headers('Authorization'=paste('Basic',base64(paste(client_id,':',client_secret)),sep=' ')), body=list(grant_type='client_credentials'), encode='json