Skip to content
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

Use rawurlencode #140

Merged
merged 1 commit into from
Jul 19, 2022
Merged

Use rawurlencode #140

merged 1 commit into from
Jul 19, 2022

Conversation

LucaGallinari
Copy link
Member

@LucaGallinari LucaGallinari commented Jul 19, 2022

We must use "rawurlencode" instead "urlencode" as stated here
Otherwise, if you have a product with whitespaces in its code, the plugin will try to fetch the product from Akeneo with this URL
/api/rest/v1/products/AWC_AP64+BUS
that will generate a 404, 'cause the correct URL is:
/api/rest/v1/products/AWC_AP64%20BUS

Even the official API client uses the rawurlencode

@LucaGallinari LucaGallinari changed the title Update ApiClient.php Use rawurlencode Jul 19, 2022
@LucaGallinari LucaGallinari merged commit 455f2b9 into 1.15 Jul 19, 2022
@lruozzi9 lruozzi9 deleted the proper-url-enconding branch July 19, 2022 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants