I am trying to call an API endpoint using axios but axios adds some strings on the end of the request url.
I have an endpoint which is
https://api.com/api/Inbound/RemoveCartItem
But what happens is that the request URL is transformed into this mess when the function is called
https://api.com/api/Outbound/RemoveCartItem%E2%80%8B
I have been trying to figure this out what is causing the weird strings to appear on the end part of the request URL.
Here is my function calling the URL
const removeInboundCartItem = async function(item) {
try {
const response = await axios.post(
`https://api.com/api/Inbound/RemoveCartItem`,
mapper.mapStocklistToCart(item)
);
return response;
} catch (err) {
console.error(err);
return [];
}
};