coder / hat

HTTP API testing for Go
MIT License
36 stars 3 forks source link

DuplicateBody() is an unclear name #4

Closed nhooyr closed 6 years ago

nhooyr commented 6 years ago

Not sure what would be better. 🤔

nhooyr commented 6 years ago

Maybe IdempotentRead?

ammario commented 6 years ago

I don't think that's more clear

nhooyr commented 6 years ago

DuplicateBody doesn't make it clear to me that you can call it again. IdempotentReadBody (I forgot to suffix Body in my previous comment) does.

ammario commented 6 years ago

DuplicateBody says more than it can be called multiple times. The underlying reader in the http.Response is also replaced.

nhooyr commented 6 years ago

Fair enough, lets stick with that.