'Pass value in Axios without parameter name in a React Native app
const getRating = () => {
axios
.post('https://example.com/api/engage.php', {
"eyJnaWQiOiIxMjg5MTA3NjQifQ==",
},{
headers:{
'Content-Type': 'application/json',
'api-token': 'Zk4gcwJFovIpPaXtgyA55l0BSi8ETAxfAntuq7zp1L-x4OP27G-9UtaChlNExufQ4msa38aHDNQdQQ',
}
}
).then(function (response) {
// handle success
alert(JSON.stringify(response.data));
}).catch(function (error) {
// handle error
alert(error.message);
});
};
I want to pass encoded string value with the above API and the value doesn't have name. I have tried the same in Postman, and it's working. But how to achieve the same in React Native?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
