How to Perform an HTTP Post using a REST API and Using the Msxml2 DLL

Hello all. Trying to perform an HTTP POST operation using the Msxml2 DLL and a JSON payload. From all documentation, research with other developers, etc. it appears that I have most everything correct, yet I am getting ISE's (500). Web service provider hasn't been any help with diagnosing, so I have been left to try to figure it out on my own.

What DOES work:

- All GET operations, using a small variant in URL, and returning the expected JSON response.
- All operations (GET and POST) call for an authorization header, and an accept header, shown below, and working for the GET operations:
hdHTTP:setRequestHeader("Authorization", p-token).
hdHTTP:setRequestHeader("Accept","application/json; charset=UTF-8").

The only difference (according to the documentation) with the POST operation that fails is that it:

- is a POST - verified
- has a slightly different URL (for the resource) - verified
- requires a JSON payload - verified with another developer's working JSON payload

Obviously, the payload has to be specified somewhere, and I thought that it should be in the .Send method, as in:

Is this the correct place to insert the payload?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Corrected Send

The captured Send method deleted the payload as I had inserted it in LT/GT characters which were interpreted as metatags.

Should have read :

hdHTTP:Send(JSON payload here).