You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An alternative to that would be to use this.gson.fromJson inside the HTTP methods and provide the type decoding type with a generic. We would avoid a lot of code duplication by doing so.
Description
Every method that makes an HTTP request also decode the JSON from that request inside its method.
Example:
meilisearch-java/src/main/java/com/meilisearch/sdk/TasksHandler.java
Lines 48 to 51 in 04244fa
An alternative to that would be to use
this.gson.fromJson
inside the HTTP methods and provide the type decoding type with a generic. We would avoid a lot of code duplication by doing so.By adding a generic to this function for example:
meilisearch-java/src/main/java/com/meilisearch/sdk/MeiliSearchHttpRequest.java
Lines 51 to 53 in 04244fa
Basic example
pseudo code:
Which change the first example to the following:
Possible issue
This method does not use the fromJson method:
meilisearch-java/src/main/java/com/meilisearch/sdk/Search.java
Lines 28 to 32 in 04244fa
The text was updated successfully, but these errors were encountered: