I try to fetch some data from the WooCommerce API with:
let currentUserEmail = "test+test@my-url.com"
let apiURL = 'https://www.url.com/wc-api/v3/customers/email/' + currentUserEmail;
or
let currentUserEmail = "test+test@my-url.com"
let apiURL = 'https://www.url.com/wc-api/v3/customers/email/' + encodeURIComponent(currentUserEmail);
In both for this email address case I get a 404 error. I think this is because of the + sign. How can I pass the email address correctly to send the get request in the right way?