Skip to content

NtlmHttpHandler allows to create NTLM-friendly http handlers for HttpClient.

License

Notifications You must be signed in to change notification settings

EgorBo/NtlmHttpHandler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NtlmHttpHandler

NtlmHttpHandler allows to create NTLM-friendly http handlers for HttpClient. It creates an instance of legacy WebRequest-based HttpHandler for Xamarin.Android and a modern SocketHandler-based HttpClientHandler for other platforms.

Nuget: https://www.nuget.org/packages/NtlmHttpHandler/

Usage:

var handler = NtlmHttpHandlerFactory.Create();
handler.Credentials = new NetworkCredential("user", "psw", "domain"); // or via CredentialCache
var httpClient = new HttpClient(handler);

For Link All or Link SDK assemblies only modes you need to preserve the following items via XML:

<linker>
    <assembly fullname="System.Net.Http">
        <type fullname="System.Net.Http.HttpClientHandler*" />
        <type fullname="System.Net.Http.MonoWebRequestHandler*" />
    </assembly>
</linker>

For Release mode and Xamarin.Android don't forget to enable "Internet" permission in Android Manifest.

About

NtlmHttpHandler allows to create NTLM-friendly http handlers for HttpClient.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages