Description
When I try fetch some backend's api, then response, in case of success, has contentType application/json and http status 204 (no content), my api call fails with error: "Invalid response for blob:"
If response have some content, fetch works perfectly;
Update:
RN default fetch( whatwg-fetch ) request fails always when response status 204( no content ), regardless of content-type, request method( tested on GET / POST ).. and, even if response has some data in body, but have status 204 - fetch fails with error "Invalid response for blob:".
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: 9.3.0
Yarn: 1.3.2
npm: 5.6.0
Watchman: Not Found
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: ^16.0.0 => 16.2.0
react-native: ^0.54.0 => 0.54.0
whatwg-fetch: ^1.0.0 => 1.1.1
Expected Behavior
Works normally. Without some errors in fetch only because response has status 204( no content );
Actual Behavior
Fails with error: "Invalid response for blob:"
Steps to Reproduce
-
Fetch( with default RN fetch ) some backend's API, that response with contentType application/json and http status 204 (no content), i.e response contains only header.
-
Enjoy fails with.. description about.. blob !?