aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/client.go b/client.go
index f966ec1..0422a39 100644
--- a/client.go
+++ b/client.go
@@ -92,7 +92,9 @@ func (c *Client) post(url string, s Signer, v interface{}) (*http.Response, erro
c.nonce <- replyNonce(resp)
c.Link = links(resp)
- c.Location = location(resp)
+ if resp.StatusCode == http.StatusCreated {
+ c.Location = location(resp)
+ }
return resp, nil
}