I am using the Microsoft XMLHTTP(server) method to connect to an external link in POST mode.
From local works well, on the Citrix server immediately error...
It would seem that the destination url has no blocks or filters and that at least TLS 1.2 communication is needed...
Do you know if it is something that must be set on the Server or if on the call I can set TLS 1.2?
This is how the call is made:
Code: Select all
Set sRequest_Url = sURL
Set sRequest_Action = "POST"
Set sRequest_Input = sJSON_Input
Set sStatus = ""
Set dfErrori = ""
!
Set sPROXY_Valore = dfProxy
If (nWSPBLNexi_PROXY_Timeout <= 0)
Set nPROXY_Timeout = 10000 ! 10000 = 10 Secondi
Else
Set nPROXY_Timeout = nWSPBLNexi_PROXY_Timeout
!
! Disable Gupta error messageboxes. We handle the errors ourselves
Call SalActiveXAutoErrorMode( FALSE )
!
If uHTTP.Create( )
! Set synchronous call
Call uVariantAsync.SetBoolean( FALSE )
! No user/password needed, so make optional
Call uVariantUser.MakeOptional( )
Call uVariantPassword.MakeOptional( )
!
! Imposto Timeout Chiamata
Call uHTTP.setTimeouts( nPROXY_Timeout, nPROXY_Timeout, nPROXY_Timeout, nPROXY_Timeout )
! Setto Parametri PROXY
If cbProxy
Call uVariantProxyServer.SetString( sPROXY_Valore )
Call uVariantProxyBypasslist.MakeOptional( )
Call uHTTP.setProxy( 2, uVariantProxyServer, uVariantProxyBypasslist )
Set dfErrori = "PROXY SET - "
!
If uHTTP.open( sRequest_Action, sRequest_Url, uVariantAsync, uVariantUser, uVariantPassword )
! Now set the JSON in the body
Call uVariantBody.SetString( sRequest_Input )
!
! Set the HTTP header properties
Call uHTTP.setRequestHeader( 'Content-Type', 'application/json' )
Call uHTTP.setRequestHeader( "Accept", 'application/json' )
Call uHTTP.setRequestHeader( "Accept-Encoding", 'gzip,deflate' )
Call uHTTP.setRequestHeader( "Connection", 'Keep-Alive' )
!
Set dfErrori = dfErrori || "Open OK - "
!
! Do execute the service
If uHTTP.send( uVariantBody )
! Get the status of the call
Call uHTTP.PropGetstatus( nStatus )
Call uHTTP.PropGetstatusText( sStatus )
! Set dfStatus = sStatus || " (" || SalNumberToStrX( nStatus, 0 ) || ")"
Set sStatus = sStatus || " (" || SalNumberToStrX( nStatus, 0 ) || ")"
Set dfErrori = dfErrori || "Send OK - "
!
! Get the header info => Commento non serve
! Call uHTTP.getAllResponseHeaders( sHeaders )
! Display the header info => Commento non serve
! Set mlResponse = sHeaders
!
! Get the response document
Call uHTTP.PropGetresponseText( sJSON_Output )
!
! Display the response on GUI
! Set mlResponse = mlResponse || "
RISPOSTA:
" || VisStrSubstitute( sResponseText, "}", "}
" )
Else
Set sStatus = "Error send"
Call uHTTP.GetLastError( oErrore )
Else
Set sStatus = "Error opening"
Call uHTTP.GetLastError( oErrore )
!
! Detach/release the object
Call uHTTP.Release( )
Else
Set sStatus = "Error create XMLHTTP60"