diff --git a/experimental/libbox/http.go b/experimental/libbox/http.go index 87c5bed6..f1fbad58 100644 --- a/experimental/libbox/http.go +++ b/experimental/libbox/http.go @@ -52,6 +52,7 @@ type HTTPRequest interface { type HTTPResponse interface { GetContent() ([]byte, error) GetContentString() (string, error) + GetFinalURL() string WriteTo(path string) error } @@ -233,6 +234,11 @@ func (h *httpResponse) GetContentString() (string, error) { return string(content), nil } +func (h *httpResponse) GetFinalURL() string { + finalURL := h.Request.URL.String() + return finalURL +} + func (h *httpResponse) WriteTo(path string) error { defer h.Body.Close() file, err := os.Create(path)