Skip to content

Incorrect encoding of URL Components #134

Description

@quaaantumdev

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions