algolia / algoliasearch-client-java

⚡️ A fully-featured and blazing-fast Java API client to interact with Algolia.
https://www.algolia.com/doc/api-client/getting-started/install/java/
MIT License
47 stars 33 forks source link

Handle url unsafe characters #778

Closed nickstanish closed 2 years ago

nickstanish commented 2 years ago

Delete Object breaks if / is present in objectId: for example arn:aws:s3:::bucket/123

{"message":"Path not supported by Algolia REST API. Please have a look at http://www.algolia.com/doc/rest_api for the list of valid commands","status":404}

Description

Acceptable Characters for ObjectId states that objectId can "Contain any character", and the Algolia REST API has several routes with objectId as a parameter.

Currently it appears that only Get Object handles url encoding the objectId https://github.com/algolia/algoliasearch-client-java-2/blob/9df8d4f4a0d5ae7e92921e17ff43607fa5424664/algoliasearch-core/src/main/java/com/algolia/search/SearchIndex.java#L185

Delete and Partial Update do not url encode the objectId

Steps To Reproduce