Skip to content

Take an interface for http.Client #33

@jlordiales

Description

@jlordiales

It would be nice if https://github.com/machinebox/graphql/blob/master/graphql.go#L48 could take a Doer interface, compatible with the std lib *http.Client so that clients can pass in whatever http client they want:

type Doer interface {
	Do(req *http.Request) (*http.Response, error)
}

This shouldn't break any clients using the std lib today.

I'd be happy to create a PR if you don't see any issue with the change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions