Using HTTP.OutboundAdapter to send Page
I am trying to figure out how to send a Page via a HTTP.OutboundAdapter to a URL from Ensemble.
We have a URL that I am able to pass PNo=xxxx%PMsg=xxxx as parameters to send the page to a pager.
http://xxxxx.xxxxx.xxx/Employee/Tools/Paging/SendPage.aspx?PNo=1817&PMsg...
When I send the above URL through a REST client I receive a Response of "SENT".
But when I try to send it through the HTTP.OutboundAdpater I do not get a response.
Method Sample(pReq As osuwmc.Page.DataStructures.Page, Output pResp As %Net.HttpResponse) As %Status
{
set pInput = "PNo="_pReq.PagerNumber_"&PMsg="_pReq.Message
set tSC = ..Adapter.Post(.tResponse,,.pInput)
if ('tSC)
{
$$$LOGERROR(tSC)
}
quit tSC
}
When I call ..Adapter.Post(.tResponse,,.pInput) am I to assume that .pInput is putting
the data into the body of the message and not appending it to the URL?
How can I input parameters to be added to the end of the URL that is
being passed in the settings of the Operation?
Thanks
Scott
Product version: Ensemble 2018.1
$ZV: Cache for UNIX (IBM AIX for System Power System-64) 2018.1.3 (Build 414U) Mon Oct 28 2019 11:24:02 EDT
Just a quick thought: if everything is being passed in the URL then this should probably be a GET rather than a POST.
You can call ..Adapter.Get() instead, passing it pFormVarNames as a list of form/URL variable names and pData with the actual values.
https://docs.intersystems.com/healthconnectlatest/csp/documatic/%25CSP.D...
Here's a sample. The resulting URL is "/some-url?PNo=12345&PMsg=this%20is%20my%20pager%20message"
Hey Scott.
I think you can achieve this by setting the second parameter to a comma delimted list of the request names, and then pass each value afterwards (in the same order you have the names).
For example: