mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add Content-Type header to dev server requests (#49042)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49042 Minor fix to align with adjacent `/open-stack-frame` call: https://fburl.com/code/o9rwbmxr. Changelog: [Internal] Reviewed By: robhogan Differential Revision: D68830215 fbshipit-source-id: 87ef0c14bdedd34153014721b85bd24af24c1db7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
26afc804b7
commit
97ee93fd5a
@@ -16,6 +16,9 @@ export default function openURLInBrowser(url: string) {
|
||||
// $FlowFixMe[unused-promise]
|
||||
fetch(getDevServer().url + 'open-url', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({url}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -42,6 +42,9 @@ export default async function symbolicateStackTrace(
|
||||
const fetch = global.fetch ?? require('../../Network/fetch');
|
||||
const response = await fetch(devServer.url + 'symbolicate', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({stack, extraData}),
|
||||
});
|
||||
return await response.json();
|
||||
|
||||
Reference in New Issue
Block a user