-
Notifications
You must be signed in to change notification settings - Fork 25k
Closed
Labels
Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: Windows 10
Node: 8.9.4
Yarn: 1.3.2
npm: 5.6.0
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found
Packages: (wanted => installed)
react: ^16.2.0 => 16.2.0
react-native: 0.52.0 => 0.52.0
Steps to Reproduce
const headersArray = [
['Content-Type', 'application/json'],
['Authorization', 'Bearer token']
];
const headers = new Headers(headersArray);
console.log(headers.get('Content-Type'));
Expected Behavior
(In debug console):
application/json
Actual Behavior
(In debug console):
null
The issue occurred when I tried to share working code of fetch calls between a usual React project and a RN project. In React (in chrome) this code works perfectly, but RN cannot initialize Headers using string[][] parameter.
Here is an example of creating Headers from array of arrays.
Metadata
Metadata
Assignees
Labels
Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.