Help Deugging CFHTTP - NB

Hello

I running Lucee 5.x on Windows 10 Pro
I’m using a framework called CFWheels
Installed using Commandbox

Basically I’m stepping through an Oauth2 POC and I just need help debugging my CFHTTP as I’m getting 401 responses and it would be helpful to see the actual raw HTTP being sent to intuit.

As per Intuit’s docs the HTTP request to exchange the authorization code for an access token should take this form:

POST https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer HTTP/1.1
Accept: application/json
Authorization: Basic UTM0dVBvRDIwanp2OUdxNXE1dmlMemppcTlwM1d2
NzRUdDNReGkwZVNTTDhFRWwxb0g6VEh0WEJlR3dheEtZSlVNaFhzeGxma1l
XaFg3ZlFlRzFtN2szTFRwbw==
Content-Type: application/x-www-form-urlencoded
Host: oauth.platform.intuit.com
Body: grant_type=authorization_code&
code=L3114709614564VSU8JSEiPkXx1xhV8D9mv4xbv6sZJycibMUI&
redirect_uri=https://www.mydemoapp.com/oauth-redirect

This is my code: (MY_CLIENT_ID and MY_CLIENT_ID are the actual values of course)

I’m getting bad request responses, I feel like I just need to see the RAW HTTP to debug this.

try using a proxy like fiddler