refactor: moved http.Client to model.RequestContext

Signed-off-by: SoXX <soxx@fenpa.ws>
This commit is contained in:
SoXX 2023-10-23 10:30:11 +02:00
parent bd1f33dced
commit 141a06a5a0

View File

@ -31,14 +31,14 @@ func TestGetTag(t *testing.T) {
httpmock.RegisterResponder("GET", "https://e621.net/tags/165165.json", jsonResponser)
requestContext := model.RequestContext{
Client: http.Client{},
Host: "https://e621.net",
UserAgent: "Go-e621-SDK (@username)",
Username: "memo",
APIKey: "123456",
}
client := http.Client{}
tag, err := GetTag(client, requestContext, "165165")
tag, err := GetTag(requestContext, "165165")
if err != nil {
t.Error(err)
return