- Code: Select all Expand view
Try
oConn := CreateObject( 'MSXML2.XMLHTTP' )
Catch
oConn := CreateObject( 'Microsoft.XMLHTTP' )
End
Try
oConn:Open( 'POST', ::cUrl, FALSE )
oConn:setRequestHeader( "Content-Type", "application/x-www-form-urlencoded" )
oConn:Send( cParams )
cRet := oConn:ResponseBody
If !Empty( cRet )
cRet := StrTran( StrTran( StrTran( cRet, "z{|}" ), Chr(13) ), Chr(10) )
EndIf
If File( cFile )
FErase( cFile )
EndIf
hFile := FCreate( cFile, FC_NORMAL )
FWrite( hFile, cRet )
FClose( hFile )
::cBuffer:=cRet
lRet := TRUE
Catch
lRet := FALSE
End
Return lRet
But I want to define the proxy settings because this work in a normal network but inside a network with proxy I cant receive the return.
How to do it?
Obs.: I already try this
- Code: Select all Expand view
...
oConn:Open( 'POST', ::cUrl, FALSE )
oConn:setRequestHeader( "Content-Type", "application/x-www-form-urlencoded" )
oConn:SetProxy( 2, cProxyIp+":"+cProxyPort )
oConn:SetProxyCredentials( cProxyUser, cProxyPass )
oConn:Send( cParams )
...