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'm trying THTTPReqResp, but I'm stuck here:
The web service does not follow the specs and expects a
Content-Type: text/xml; charset=utf-8
instead of
Content-Type: text/xml; charset="utf-8"
How can I add/overwrite a header using THTTPReqResp? Here's the code so far:
HTTPReqResp1.SoapAction := '"http://schemas.microsoft.com/exchange/services/2006/messages/ResolveNames"';
// HTTPReqResp1.UseUTF8InHeader := true; // Already
HTTPReqResp1.URL := 'https://webmail.mailserver.nl/ews/exchange.asmx';
HTTPReqResp1.Execute(TSRequest,TSResponse);
The Content-Type error occurs on the Execute (or on the Receive if I use Send/Recieve instead of Execute)
BTW If THTTPReqResp is not the right way to, comments are welcome. I'm also trying TidHTTP, see this post.
Delphi XE2 Update 4 with Indy 10.5.8.0
Thanks Jan