We need to be able to do Basic authentication and NTLM authentication with the HttpClient. I don't see a way to do that. I suppose that for Basic, we could manually construct and add the header ourselves, but that's not practical with NTLM.
Actually, you can do Basic Authentication with HttpClient. Here is how:
RequestMessage : HttpRequestMessage;
Headers : HttpHeaders;
TempBlob : Record TempBlob temporary;
begin
RequestMessage.GetHeaders(Headers);
AuthText := StrSubstNo('%1:%2',Parameters.UserName,Parameters.Password);
TempBlob.WriteAsText(AuthText,TextEncoding::Windows);
Headers.Add('Authorization', StrSubstNo('Basic %1',TempBlob.ToBase64String()));
end
Right. That's what I meant by generating the header manually. However, we also need NTLM support.
It's on our backlog, no timeframe yet.
Hi, @StanislawStempin any update on this?
Hi! NTLM support is available in the dev preview and will be shipped in the next major release. Please try it out and let us know what you think!
Most helpful comment
Hi! NTLM support is available in the dev preview and will be shipped in the next major release. Please try it out and let us know what you think!