Solid.Http.Core Initialization - SOLIDSoftworks/Solid.Http GitHub Wiki
Initialization
SolidHttp is designed to work with the Startup class and IServiceCollection.
Basic initialization
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddSolidHttpCore();
}
}
Intermediate initialization
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services
.AddSolidHttpCore(builder => builder.Configure(options => options.OnRequestCreated((provider, request) =>
{
request.WithHeader("x-default-header", "default");
}));
}
}