My code look like this
import base64 from "react-native-base64";
fetch("https:apilink", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Basic " + base64.encode("xelsysadm:Secure99"),
},
})
but still I dont know why it showing network req fail It working fine on postamn . Is i am doing something worng. please guide me.
Try to put
Authorization
into parentheses, like that :
import base64 from "react-native-base64";
fetch("https:apilink", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Basic " + base64.encode("xelsysadm:Secure99"),
},
})