Skip to content

Commit 43cf78d

Browse files
andrejborstnikfacebook-github-bot
authored andcommitted
chore: add headers.Content-type to openFileInEditor call (#33517)
Summary: Currently the `Content-type` is not defined and defaults to `text/plain`. This makes it more accurate. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [internal] [Changed] - add `headers.Content-type` to `openFileInEditor` call Pull Request resolved: #33517 Test Plan: - [x] in development trigger `openFileInEditor`, e.g. by pressing on a line in a stack trace -> code editor opens Reviewed By: cipolleschi Differential Revision: D40022413 Pulled By: cortinico fbshipit-source-id: 00ad3cdcdd1f82436c04aed3643c9f0b55778592
1 parent 75b688f commit 43cf78d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Libraries/Core/Devtools/openFileInEditor.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ const getDevServer = require('./getDevServer');
1515
function openFileInEditor(file: string, lineNumber: number) {
1616
fetch(getDevServer().url + 'open-stack-frame', {
1717
method: 'POST',
18+
headers: {
19+
'Content-Type': 'application/json',
20+
},
1821
body: JSON.stringify({file, lineNumber}),
1922
});
2023
}

0 commit comments

Comments
 (0)