File tree Expand file tree Collapse file tree 2 files changed +8
-21
lines changed
Expand file tree Collapse file tree 2 files changed +8
-21
lines changed Original file line number Diff line number Diff line change @@ -16,22 +16,17 @@ Class constructor($inProvider : cs.OAuth2Provider; $inParameters : Object)
1616 // ----------------------------------------------------
1717
1818
19- Function _postJSONMessage ($inURL : Text; $inMail : Object; $bSkipMessageEncapsulation : Boolean; $inHeader : Object) : Object
19+ Function _postJSONMessage ($inURL : Text; $inMail : Object; $bSkipMessageEncapsulation : Boolean; $inHeaders : Object) : Object
2020
2121 var $response : Object
2222
2323 If ($inMail# Null)
2424
2525 var $headers : Object:= {}
26- $headers ["Content- Type"]:= "application/json"
27- If (($inHeader# Null) && (Value type ($inHeader )= Is object))
28-
29- var $key : Text
30- var $keys : Collection:= OB Keys ($inHeader )
31- For each ($key; $keys)
32- $headers [$key ]:= $inHeader [$key ]
33- End for each
26+ If (($inHeaders# Null) && (Value type ($inHeaders )= Is object))
27+ $headers := OB Copy ($inHeaders )
3428 End if
29+ $headers ["Content- Type"]:= "application/json"
3530
3631 var $message : Object
3732 var $messageCopy : Object:= This ._copyGraphMessage ($inMail )
Original file line number Diff line number Diff line change @@ -69,16 +69,12 @@ Function _sendRequestAndWaitResponse($inMethod : Text; $inURL : Text; $inHeaders
6969 var $options : Object:= {headers: {}}
7070 var $token : Text:= This ._getAccessToken ()
7171
72+ If (($inHeaders# Null) && (Value type ($inHeaders )= Is object))
73+ $options .headers := OB Copy ($inHeaders )
74+ End if
7275 If (Length (String ($token ))> 0)
7376 $options .headers ["Authorization"]:= This ._getAccessTokenType ()+ " " + $token
7477 End if
75- If (($inHeaders# Null) && (Value type ($inHeaders )= Is object))
76- var $keys : Collection:= OB Keys ($inHeaders )
77- var $key : Text
78- For each ($key; $keys)
79- $options .headers [$key ]:= $inHeaders [$key ]
80- End for each
81- End if
8278 If (Length (String ($inMethod ))> 0)
8379 $options .method := Uppercase ($inMethod )
8480 End if
@@ -202,11 +198,7 @@ Function _returnStatus($inAdditionalInfo : Object) : Object
202198 var $errorStack : Collection:= Super ._getErrorStack ()
203199
204200 If (Not (OB Is empty ($inAdditionalInfo )))
205- var $key : Text
206- var $keys : Collection:= OB Keys ($inAdditionalInfo )
207- For each ($key; $keys)
208- $status [$key ]:= $inAdditionalInfo [$key ]
209- End for each
201+ $status := OB Copy ($inAdditionalInfo )
210202 End if
211203
212204 If ($errorStack .length > 0)
You can’t perform that action at this time.
0 commit comments