Usually response does contain status information in StatusCode and StatusLine properties.
You need to change this line
Set httpResponse = httpRequest.Post("/sample/", 2)to
#dim sc As %Status = $$$OK
Set sc = httpRequest.Post("/sample/", 2)
Write $System.Status.GetErrorText(sc)As Post method returns status.
After debugging you can use
write $$$ISERR(sc)
macro to check if result of some operation is an error.
- Log in to post comments