Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offer mock fot HTTPClient + document usage #2

Open
KrzysztofMadejski opened this issue Sep 13, 2019 · 0 comments
Open

Offer mock fot HTTPClient + document usage #2

KrzysztofMadejski opened this issue Sep 13, 2019 · 0 comments

Comments

@KrzysztofMadejski
Copy link
Owner

package utils

import (
	"io"
	"net/http"
	"net/url"
)

// HTTPClient interface for http.Client struct
// mocked in mocks/HTTPClient by vektra/mockery
type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
	Get(url string) (resp *http.Response, err error)
	Post(url, contentType string, body io.Reader) (resp *http.Response, err error)
	PostForm(url string, data url.Values) (resp *http.Response, err error)
	Head(url string) (resp *http.Response, err error)
	CloseIdleConnections()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant