-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
id should be url encoded when used in the delete url #43
Comments
I'm not sure that we can do anything about this, unfortunately, as it would be backwards-incompatible. Anyone using data which requires URI encoding would already be using URI encoding themselves, and double-encoding it would cause a failure. As a workaround, you should be able to run If you can think of a backwards-compatible way to do this, please let me know. |
Hi.
In any case, that will require some documentation. Also maybe see what other Customer.io libs in other languages are doing, probably better to stay consistent. Cheers. |
I've surveyed what the other Customer.io libraries are doing, and they all expect the id parameter to be URL encoded by the developer. For consistency that's the approach we're going to take here as well. I'll leave this bug open until I update the documentation to reflect this. Thank you for the report and follow-up! |
Makes sense then. |
Hello.
We use the email address as id for users that want to subscribe to the newsletter but have no user account.
When the user subsequently creates a real account, we delete the existing record based on email address and add a new one with an integer id.
We recently have a user that has an accented character in the "local" part of the email address (ex: abcdé[email protected]). The delete call fails with the following error:
I'm not sure that this is a valid email address (I probably is according to the RFC), but I think you should probably make the lib more robust and url encode the passed id.
The text was updated successfully, but these errors were encountered: