I want to approach the Exchange EWS webservice and handle XML SOAP composition (request) and parsing (response) myself. Therefore, THTPPRIO seems a bit overkill.
I\'
I found it:
procedure TForm1.BeforeRRPost(const HTTPReqResp: THTTPReqResp; Data: Pointer);
const
cContentHeader = 'Content-Type: text/xml; charset=utf-8';
begin
HttpAddRequestHeaders(Data, PChar(cContentHeader), Length(cContentHeader), HTTP_ADDREQ_FLAG_REPLACE);
// Or HttpAddRequestHeaders(Data, PChar(cContentHeader), Length(cContentHeader), HTTP_ADDREQ_FLAG_ADD);
end;
and then before the HTTPReqResp1.Execute or HTTPReqResp1.Send:
HTTPReqResp1.OnBeforePost := BeforeRRPost;