Backend developer send me API like this To test it on poastman
http://app/channel_partner/patients/add?token=59bd1e3711ce73c150b68f3741df4363cf766a0e2fe54dcb5f804a08f3f0d525
But now How can I send token to API in react native I am sending like this but its Not working
let url = URLs.addLeads;
let options = {
method: "POST",
url: url,
headers: {
Accept: "application/json",
"Content-Type": "application/json",
},
You've tagged this with axios so use the params config option to safely add URL query parameters to your request
const options = {
url: URLs.addLeads,
method: "POST",
params: { token }
};
This will add a token query parameter with a correctly URL-encoded value.
You don't need to change the headers; the Axios defaults already have you covered.