How to add POST Body data to Net.HttpRequest
Hi, how do I add the POST body content to my Net.HttpRequest (It's not a key value pair, I am posting my own JSON to the remote server because it needs JSON in the body):
set httpRequest=##class(%Net.HttpRequest).%New()
set httpRequest.Https=1
set httpRequest.Server="redacted.azurewebsites.net"
set AbsolutePath="/api/redacted"
set QueryString="?operation=redacted&id=redacted"
set QueryString="?operation=redacted&id=redacted"
set status=httpRequest.Post(AbsolutePath_QueryString)
But how to add the Body to the request?
For the sake of this post, the body could be:
{ "MyKey":"MyValue" }
but in reality it's a highly nested, valid, JSON string.
I've looked at the API but can't make sense of it - https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25Net.HttpRequest
Kind regards!