Closed xforcarlos closed 3 years ago
From the results you shared above I can see Content-Type: "application/vnd.api+json"
on iOS can you share more info about the error?
Hi @chakrihacker
I already shared all the info that you'll need. Are you looking for files in particular?
and
Ignite doctor
node 14.17.0 /usr/local/opt/node@14/bin/node
npm 6.14.13 /usr/local/opt/node@14/bin/npm
axios 0.21.1
detox-cli 18.0.0
ignite-cli 6.6.0
ios-deploy 1.11.3
npm 6.14.13
osmi-cli 1.2.0
pod-install 0.1.18
react-devtools 4.10.4
yarn 1.22.10 /usr/local/bin/yarn
create-next-app 11.0.0
Ignite
ignite-cli 6.6.0 /usr/local/bin/ignite
ignite src build /usr/local/lib/node_modules/ignite-cli/build
Android
java 1.8.0_282 /usr/bin/java
android home - /Users/mahmoudhamdy/Library/Android/sdk
iOS
xcode 12.5.1
cocoapods 1.10.1 /usr/local/bin/pod
app package.json
"react": "17.0.1",
"react-native": "0.64.2",
"apisauce": "2.0.0",
"axios": "^0.18.0",
ios =>. 14.5
please let me know if you need more info
@chakrihacker hey man i found solution
this.apisauce.axiosInstance.interceptors.request.use((config) => {
if (config.method == "get") {
config.data = null
}
to make apisauce send content-type i get request make data with null
I am glad you found a solution, closing this issue
What's going on? working on Project depending on JsonApi
spend content type in get request fail on iOS work fine on android
Steps to reproduce
jsonapi standard in get request need a Content-type example : headers: { "Content-Type": "application/vnd.api+json", Accept: "application/vnd.api+json", }, to make apisauce send content-type in get request i send and empty obj data like const response : ApiResponse = await this.apisauce.get("/example", {}, { data: {} })
results
results: