Description
hello I have a fetch request that does not pass only on ios.
the request is sent with a Bearer token authorization.
var headers = new Headers();
headers.append('Accept','application/json')
headers.append('Content-Type','application/json')
headers.append('Authorization','Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NTM5MTQ5ODUsImV4cCI6MTY1NDAwMTM4NSwicm9sZXMiOlsiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoiZGVtb0BkZW1vLmNvbSJ9.EFMFD7XZFxPl0k65-g7bGNT680d9CMJjg3kTFiU1JhELPi-fMan2q0E32TJChD3UUzEq8mH5oETxDk4VRFvHxMxZnnnRMYnVvhRjiPIxN42IIyc9tF7tSglWCdT_s8A72-cvwa7nnk5DHM2gYurD6GsJQBzAbH3Pet3ixsvOO2J27wK2WHGdocmEd2EYxl3JGNG0NFFR0ZGBc8a-WCFsdbRumAbXjEKdHgFIZD-pVCKA1_2TcBpz7L-q-igbXuHZv62aZcCKpIBnL1iL62PTzc7b2kpflmc_62BYqPPhJkVyjLvT9SBtk9LodX9F0r2MsLCeV-ypQ92w0SQZDP0FUQ')
fetch('https://garden.umoyatech.ca/api/parent', {
headers: headers,
method:'GET'
}).then(r => r.json()).then(j => {
console.log(j)
})
the problem is that I always have this message "token not found". I have tested all the methods but nothing I have deduced that the headers are not sent
Version
0.68.1
Output of npx react-native info
System:
OS: macOS 12.4
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 2.16 GB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.0 - /usr/local/bin/node
Yarn: 1.22.18 - /usr/local/bin/yarn
npm: 8.11.0 - /usr/local/bin/npm
Watchman: 2022.03.21.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8309675
Xcode: 13.4/13F17a - /usr/bin/xcodebuild
Languages:
Java: 11.0.15 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
1 create last react native app
2 make fecth request with bearer token
Snack, code example, screenshot, or link to a repository

Description
hello I have a fetch request that does not pass only on ios.
the request is sent with a Bearer token authorization.
var headers = new Headers();
headers.append('Accept','application/json')
headers.append('Content-Type','application/json')
headers.append('Authorization','Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NTM5MTQ5ODUsImV4cCI6MTY1NDAwMTM4NSwicm9sZXMiOlsiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoiZGVtb0BkZW1vLmNvbSJ9.EFMFD7XZFxPl0k65-g7bGNT680d9CMJjg3kTFiU1JhELPi-fMan2q0E32TJChD3UUzEq8mH5oETxDk4VRFvHxMxZnnnRMYnVvhRjiPIxN42IIyc9tF7tSglWCdT_s8A72-cvwa7nnk5DHM2gYurD6GsJQBzAbH3Pet3ixsvOO2J27wK2WHGdocmEd2EYxl3JGNG0NFFR0ZGBc8a-WCFsdbRumAbXjEKdHgFIZD-pVCKA1_2TcBpz7L-q-igbXuHZv62aZcCKpIBnL1iL62PTzc7b2kpflmc_62BYqPPhJkVyjLvT9SBtk9LodX9F0r2MsLCeV-ypQ92w0SQZDP0FUQ')
fetch('https://garden.umoyatech.ca/api/parent', {
headers: headers,
method:'GET'
}).then(r => r.json()).then(j => {
console.log(j)
})
the problem is that I always have this message "token not found". I have tested all the methods but nothing I have deduced that the headers are not sent
Version
0.68.1
Output of
npx react-native infoSystem:
OS: macOS 12.4
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 2.16 GB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.0 - /usr/local/bin/node
Yarn: 1.22.18 - /usr/local/bin/yarn
npm: 8.11.0 - /usr/local/bin/npm
Watchman: 2022.03.21.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8309675
Xcode: 13.4/13F17a - /usr/bin/xcodebuild
Languages:
Java: 11.0.15 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
1 create last react native app
2 make fecth request with bearer token
Snack, code example, screenshot, or link to a repository