Я уже очень близко !!!!!
Код:
Возвращенные заголовки (после ответа сервера) можно посмотреть так:
idHttp.Response.RawHeaders.GetText;
Вот так реализовал
Код:
try
page := IdHttp1.post('https://secure.site.org/site/API',data);
Except
on Exception do Memo1.Lines.Text:= idHttp1.Response.RawHeaders.GetText ;
end;
Программа вывела вот это
Код:
Date: Wed, 28 Mar 2012 19:35:03 GMT
Server: Apache
Cache-Control: private
Transfer-Encoding: chunked
Content-Type: text/xml; charset=UTF-8
Но этого не достаточно,нужно остльное остальное
Код:
TTP/1.1 403 Forbidden
Date: Wed, 28 Mar 2012 19:35:03 GMT
Server: Apache
Cache-Control: private
Transfer-Encoding: chunked
Content-Type: text/xml; charset=UTF-8
236
<?xml version="1.0" encoding="UTF-8"?>
<Response xsi:schemaLocation="http://site.com/crm/v1.0 http://service.site.net/xmlschema/crm.public.v1.xsd" xmlns="http://convio.com/crm/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<errors>
<code>101</code>
<message>!!!!!!!!!!!!!Тут то что мне надо!!!!!!!!!!!!!!!(Обычный текст)</message>
<reason>FIELD_VALIDATION</reason>
<pageError>!!!!!!!!!!!!!Тут то что мне надо!!!!!!!!!!!!!!!(Обычный текст)</pageError>
<fieldError>!!!!!!!!!!!!!Тут то что мне надо!!!!!!!!!!!!!!!(Обычный текст)</fieldError>
</errors>
</Response>
Как мне использовать idHttp.Response. что бы получить весь ответ ???? Дайте почитать что нибудь про idHttp.Response