Skip to content

0.54's fetch doesn't bring us html .text()  #18635

@goodhyun

Description

@goodhyun

Environment

Environment:
OS: macOS High Sierra 10.13.3
Node: 6.11.4
Yarn: Not Found
npm: 3.10.10
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: ^16.3.0-alpha.1 => 16.3.0-alpha.1
react-native: ^0.54.4 => 0.54.4

Steps to Reproduce

let res = await fetch("some.domain/index.html")
let text = await res.text()  

in this case, if it's not json but a plain html fetch, those text will be undefined.
In res, there is no _bodyText, it only has _bodyInit and _bodyBlob, which is understandable considering 0.54's change around fetch/Blob, but fetch's .text() doesn't seem to be working like previous versions.

Not sure whether this is related to #18547 or #18500

Expected Behavior

text should be populated with the HTML text.

Actual Behavior

undefined

0.53.3 is working like expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Impact: RegressionDescribes a behavior that used to work on a prior release, but stopped working recently.StaleThere has been a lack of activity on this issue and it may be closed soon.🌐NetworkingRelated to a networking API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions