'I failed to send data from client side to sever side to get JSONWEBTOKEN for user
const getOrders = async() =>{
const email = user?.email;
const url = http://localhost:5000/orders?email=${email};
const {data} = await axios.get(url,{
headers: {
authorization: Bearer ${localStorage.getItem('accessToken')}
}
});
setorders(data);
console.log(data)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
