Get images

This commit is contained in:
Deluan
2021-02-08 10:14:29 -05:00
committed by Deluan Quintão
parent 28cdf1e693
commit 877cdf1d5c
6 changed files with 101 additions and 12 deletions
+6 -1
View File
@@ -87,7 +87,12 @@ func (c *CachedHTTPClient) deserializeReq(reqStr string) (*http.Request, error)
bodyStr, _ := base64.StdEncoding.DecodeString(*data.Body)
body = strings.NewReader(string(bodyStr))
}
return http.NewRequest(data.Method, data.URL, body)
req, err := http.NewRequest(data.Method, data.URL, body)
if err != nil {
return nil, err
}
req.Header = data.Header
return req, nil
}
func (c *CachedHTTPClient) serializeResponse(resp *http.Response) string {