User bio
404 bio not found
Member since Nov 11, 2015
Posts:
Replies:
Hello.
I agree it works great for ObjectScript code, but it sits at an empy method invocation unfortunately. And I need not even my method, but library calls.
Move global/subscript to RO DB and collect <PROTECT> errors.
Open Exchange applications:
Certifications & Credly badges:
Eduard has no Certifications & Credly badges yet.
Global Masters badges:







Followers:
Following:
Eduard has not followed anybody yet.
In the main method of
EnsLib.HTTP.OutboundAdapter
-SendFormDataArray
line 5 you can see the following code:#; Create an Http Request Object Set tHttpRequest=$S($$$IsdefObject(pHttpRequestIn):pHttpRequestIn,1:##class(%Net.HttpRequest).%New()) $$$ASSERT($IsObject(tHttpRequest)&&tHttpRequest.%IsA("%Net.HttpRequest"))
Which creates a new empty
%Net.HttpRequest
object, unlesspHttpRequestIn
(3rd arg) has been passed with a custom request object. Most wrapper methods (VERB
,VERBURL
andVERBFormDataArray
) do not passpHttpRequestIn
so you should get a fresh request object every time, butSendFormData
andSendFormDataURL
would passpHttpRequestIn
from caller, if given.Another place to look into is a
Send
call:Set tSC=tHttpRequest.Send($ZCVT(pOp,"U"),$G(pURL,..URL),..#DEBUG)
It has the following signature:
Method Send(type As %String, location As %String, test As %Integer = 0, reset As %Boolean = 1) As %Status
reset
arg defaults to1
, and when it's true theReset
method of%Net.HttpRequest
is called after every request.Reset
method removes headers (among other things). As you can see in the implementation:Kill i%Headers,i%FormData,i%Params
EnsLib.HTTP.OutboundAdapter
never callsSend
withreset=0
, so the request should be reset every time.That said, how do you call
SendFormDataArray
?I took a look at the article you linked to. Can you add logging to
GetRequest
method? It should be called on every business operation message.