IdHTTP XML, getting xml, help please
- by user1748535
Already some day I can not solve the problem. Help than you can.
I'm using Delphi 2010, and I can not get through IdHTTP XML document from the site. I always had the answer 403 / HTTP 1.1 and text/html (need text/xml)
When using MSXML all well and getting XML file. But I need a proxy, so need idhtop. When using the synapse does not change.
Work with msxml:
CoInitialize(nil);
GetXML:={$IFDEF VER210}CoXMLHTTP{$ELSE}CoXMLHTTPRequest{$ENDIF}.Create;
GetXML.open('POST', '***************', false, EmptyParam, EmptyParam);
GetXML.setRequestHeader('Host', '***************');
GetXML.setRequestHeader('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13');
GetXML.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
GamesBody:='***************';
GetXML.send(GamesBody);
Form1.Memo2.Lines.Text:=GetXML.responseText;
ResultPage:=GetXML.responseText;
if Pos('error code', ResultPage)=0 then
begin
CoUninitialize;
how to set up IdHTTP? All settings have changed 100 times Or a connection to a proxy MSXML?