Skip to content

Support for custom http client #89

@paiyar

Description

@paiyar

Summary

Instead of always defaulting to http.DefaultClient, allowing passing one during NewClient configuration

Use cases

This would allow one to specify a custom roundtripper without mutating the http.DefaultClient global variable, this could be useful for adding certificates for custom endpoints that use self-signed certificates or are missing intermediaries.

Proposed solution

Simply allow passing an http client in the New* constructors

Is there a workaround to accomplish this today?

Mutate the global http.DefaultClient which is bad practice and has unintended side-effects for shared code

References & Prior Work

Nope

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions