Brain Cramp: Anyone know how to send 'form-data' in an https.POST? I don't think I'm getting the
body
correct
d
Dominic B
06/05/2020, 2:16 PM
It's dependent on the POST content type header.
Dominic B
06/05/2020, 2:17 PM
If the header is/can be application/x-www-form-urlencoded you can format the body the same as a get request
s
stalbert
06/05/2020, 2:52 PM
IIRC you have to create the body manually to comply with the form post spec
stalbert
06/05/2020, 2:52 PM
I think using multipart-form-data format has been shown to work in NS
d
darrenhillconsulting
06/05/2020, 7:21 PM
Gents, you both are correct. Using 'Content-Type': 'application/x-www-form-urlencoded' ... then setting the body with value like 'grant_type=client_credentials'. Works beautifully. That's for your attention gents!