|
loHTTP = CreateObject("MSXML2.XMLHTTP.3.0")
lcRequestString = "http://" + Strtran(Alltrim(This.cIntermedServer), "http://", "") + "/ws.fwx?service=" + tcService + ;"&function=" + tcRequestFunction + IIF(Empty(tcRequestParameters), "", "&") + tcRequestParameters + ;
"&appkey=" + IIF(Empty(This.cSessionKey), This.cAppKey, This.cSessionKey) + "&device=" + This.cDevice + "&rand=" + lcRandIf This.lLogRequests
StrToFile(lcRequestString + Chr(13) + Chr(10), "HTTPRequest.txt", 1)EndIf
loHTTP.Open("GET", lcRequestString, .F.)loHTTP.Send()
tcResponse = loHTTP.ResponseBodyIf This.lLogResponses
StrToFile(tcResponse + Chr(13) + Chr(10), "HTTPResponse.txt", 1)EndIf
"&appkey=" + IIF(Empty(This.cSessionKey), This.cAppKey, This.cSessionKey) + "&device=" + This.cDevice + "&rand=" + lcRand
loHTTP = CreateObject("MSXML2.XMLHTTP.3.0")
loHTTP.open("POST", "http://" + Strtran(Alltrim(This.cIntermedServer), "http://", "") + "/ws.fwx" , .F.)
loHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
loHTTP.send(lcFormData);
*********************************************************
I'll be trying this out as soon as I write the server side code, but if anyone has any suggestions how else I could do it please let me know.
One last detail is bugging me though : I'm sending form data that is NOT XML in the latter. If I were to generate XML data as the contents of lcFormData), how do I specify XML content in the request header as opposed to loHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded;"); ?
Thanks,
Gabriel
FoxWeb Support Team support@foxweb.com email |