Http Post with header, body

Hello all
I am trying to interact with Microsoft Azure to send messages to teams. To do this, it needs to send http, both gets and posts
I have my post command working in postman, but it does not work in ignition. I tried both system.net.httppost, and system.net.httpclient and then using said client to post, but neither work.
The data has to be sent as x-www-form-urlencoded which is set in the header (or the param for the direct call), but I cannot figure out how to set the body data.

code, with areas commented out due to keys

accessTokenURL = "https://login.microsoftonline.com/" + tenantID + "/oauth2/v2.0/token"
content_type="application/x-www-form-urlencoded"
	
	#body
	
	body= {
		"grant_type":"client_credentials",
		"client_secret":"<secret string>",
		"client_id":"<id>",
		"scope":"https://graph.microsoft.com/.default"
	}

accessTokenResponse = system.net.httpPost(accessTokenURL, contentType = content_type,postData = body, throwOnError = False)

Thank you for your help

You definitely want to use httpClient over httpPost. However, httpClient (currently) doesn’t have special handling for POST parameters, so you’ll have to manually encode, e.g. with urllib:

Thank you for this information. If possible, can you link that solution on the system.net.httppost and http clien pages?