don't seek on nil options.RawBody
diff --git a/provider_client.go b/provider_client.go
index e5b75b2..4eeec59 100644
--- a/provider_client.go
+++ b/provider_client.go
@@ -189,7 +189,9 @@
if err != nil {
return nil, fmt.Errorf("Error trying to re-authenticate: %s", err)
}
- options.RawBody.Seek(0, 0)
+ if options.RawBody != nil {
+ options.RawBody.Seek(0, 0)
+ }
resp, err = client.Request(method, url, options)
if err != nil {
return nil, fmt.Errorf("Successfully re-authenticated, but got error executing request: %s", err)