Solid.Http.Json 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(builder => builder.AddJson());
    }
}

Intermediate initialization

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        var settings = new JsonSerializerSettings();
        // set custom serializer settings
        services.AddSolidHttpCore(builder => builder.AddJson(settings));
    }
}