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

Incorrect encoding of URL Components #134

Open
quaaantumdev opened this issue Jun 29, 2024 · 0 comments
Open

Incorrect encoding of URL Components #134

quaaantumdev opened this issue Jun 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@quaaantumdev
Copy link

Dart version: 3.4.3
Flutter version: 3.22.2

Describe the bug
The library incorrectly encodes the objectID and other paramters for the url.

To Reproduce

final index = Algolia(...).index('my-index');
final objectRef = index.object('some/object'); // <-- the slash will cause issues on the next line but it should be just fine for algolia
final task = objectRef.setData(/* ... */);

Expected behavior
a call to the url

PUT https://${appid}.algolia.net/1/indexes/my-index/some%2Fobject

but it will actually call

PUT https://${appid}.algolia.net/1/indexes/my-index/some/object

Explained here on the objectID, but the same can be said for the other places.

Additional context
Created a pull request to fix this, please merge :)
#133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant