ipfs-shipyard / net-ipfs-http-client

InterPlanetary File System client for .Net (C#, VB, F# ...)
MIT License
35 stars 13 forks source link

Library should allow for a custom HttpMessageHandler #10

Closed Arlodotexe closed 1 year ago

Arlodotexe commented 1 year ago

Problem

The library doesn't allow for custom HttpMessageHandlers. That means no custom headers, no custom functionality, and no polyfil on certain places where it's needed.

Solution

Rather than constructing a new HttpClientHandler here: https://github.com/ipfs-shipyard/net-ipfs-http-client/blob/main/src/IpfsClient.cs#L223

We should make this a HttpMessageHandler and move it to a property on the IpfsClient class, where the default value is new HttpClientHandler().