Show / Hide Table of Contents

    Class ServiceCollectionExtensions

    Extensions to work with Dangl.RestClient classes

    Inheritance
    System.Object
    ServiceCollectionExtensions
    Namespace: Dangl.RestClient
    Assembly: Dangl.RestClient.dll
    Syntax
    public static class ServiceCollectionExtensions : object

    Methods

    | Improve this Doc View Source

    AddDanglHttpClient<T>(IServiceCollection, String[])

    This will use the HttpClientFactory mechanism to register a for the provided generic class. It will register both the AuthenticationHandler and the FallbackHandler. Services of type ITokenHandler and ITokenStorage must be available in the dependency injection configuration.

    Declaration
    public static IHttpClientBuilder AddDanglHttpClient<T>(this IServiceCollection services, params string[] baseUrls)
        where T : class
    Parameters
    Type Name Description
    IServiceCollection services
    System.String[] baseUrls
    Returns
    Type Description
    IHttpClientBuilder
    Type Parameters
    Name Description
    T
    • Improve this Doc
    • View Source
    Back to top © Dangl IT - Georg Dangl