reactiveui / Fusillade

An opinionated HTTP library for Mobile Development
MIT License
310 stars 33 forks source link

UniqueKeyForRequest and POST body content #10

Open ChristopheOosterlynck opened 9 years ago

ChristopheOosterlynck commented 9 years ago

RateLimitedHttpMessageHandler:UniqueKeyForRequest doesn't take into account the content of the HttpRequestMessage when it is a POST request. POST requests which are similar and just have a different content, are considered the same request and only the first one is executed when multiple of those similar POST requests are outstanding. All calls receive the same response while they should actually receive different responses.

ncruces commented 8 years ago

In #6 @paulcbetts says "POST/DELETEs don't get cached or deduped", however looking at RateLimitedHttpMessageHandler doesn't seem to support this.

Requests with a body should definitely look at the body before deduplicating it. IMHO, only indeponent requests should ever be deduped. Likely, it'd simpler and "safer" to only support safe methods deduplication: GET and HEAD.