vadymmarkov / Malibu

:surfer: Malibu is a networking library built on promises
https://vadymmarkov.github.io
Other
414 stars 39 forks source link

validate() does not consider 304 a valid response #102

Closed eirikeikaas closed 5 years ago

eirikeikaas commented 6 years ago

https://github.com/hyperoslo/Malibu/blob/da4354877909d0f1efa86d642f4739290500ceb4/Sources/Response/ResponseValidation.swift#L23

vadymmarkov commented 6 years ago

I don't think 304 response should be considered as success because it doesn't contain a message body. Normally the client should handle 304 status codes and use cached data if it's present.