From e5f9f3068429aee795ab812be66b960c0ac850bd Mon Sep 17 00:00:00 2001 From: Alain Gilbert Date: Sat, 6 Aug 2022 19:01:42 -0700 Subject: [PATCH] implement Get for the ogame client --- client.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client.go b/client.go index 5ccfb6ac..afc3ea94 100644 --- a/client.go +++ b/client.go @@ -54,6 +54,14 @@ func (c *OGameClient) incrRPS() { } } +func (c *OGameClient) Get(url string) (*http.Response, error) { + req, err := http.NewRequest(http.MethodGet, url, nil) + if err != nil { + return nil, err + } + return c.Do(req) +} + // Do executes a request func (c *OGameClient) Do(req *http.Request) (*http.Response, error) { c.incrRPS()