IdHTTP XML, getting xml, help please

Posted by user1748535 on Stack Overflow See other posts from Stack Overflow or by user1748535
Published on 2012-10-16T04:58:35Z Indexed on 2012/10/16 5:01 UTC
Read the original article Hit count: 436

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about Xml

Related posts about delphi