Hi Anatoliy,
Thank you very much for this posting. I beleive that I am making progress.
However, I keep getting a 405 error response that the VERB is not allowed. I changed the verb to GET in the .Open setting, and I get the default page from that directory.
Can you help me understand what I need to do to be able to POST? I am testing against my own server, so I can change settings on it if need be...
Any pointers most welcome!
Andrew
Certainly I have to promote my own stuff -- Windows API at
http://www.news2news.com/vfp?group=92>
>Though this time I want you to take a look at this way of sending POST HTTP requests:
>
>LOCAL oHttp, cUrl, cRawData
>cUrl = 'http://...'
>cRawData = 'any raw data or leave it empty'
>oHttp = CreateObject('MSXML2.ServerXMLHTTP')
>
>WITH oHttp
> .Open('POST', cUrl, 0)
> .SetRequestHeader('myheader', 'any value')
>
> WAIT WINDOW NOWAIT 'Executing remote...'
> .Send(cRawData)
> WAIT CLEAR
>
> * obtaining a response header
> ? .GetResponseHeader('RequestError')
>
> ? .StatusText
> ? .GetAllResponseHeaders()
>
> DELETE FILE tmp.txt
> IF StrToFile(.ResponseText, 'tmp.txt') <> 0
> MODI FILE tmp.txt NOWAIT
> ENDIF
>ENDWITH
>
On a CLEAR day you can see forever.