Skip to content

Provide a generic to http delete method #470

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

Merged
merged 2 commits into from
Oct 26, 2022

Conversation

alallema
Copy link
Contributor

Pull Request

What does this PR do?

Most of the methods had to use the jsonHandler after the call to the delete method through the client. The purpose of this PR is to bypass this step to simplify the call to the delete method via the client:

    public Task resetRankingRulesSettings(String uid) throws MeilisearchException {
        Task task = jsonHandler.decode(this.indexesHandler.delete(uid), Task.class);
        return task;
    }

became

    public Task resetRankingRulesSettings(String uid) throws MeilisearchException {
        String urlPath = "/indexes/" + uid + "/settings/ranking-rules";
        return httpClient.delete(urlPath, Task.class);
    }

@alallema alallema requested a review from brunoocasali October 25, 2022 12:51
@brunoocasali
Copy link
Member

I'll let you fix the CI before review CC: @alallema

Base automatically changed from patch-put-method to patch-get-method October 26, 2022 10:57
@alallema
Copy link
Contributor Author

alallema commented Oct 26, 2022

I'll let you fix the CI before review CC: @alallema

@brunoocasali
Done, there was an extra curly brace ...

@alallema alallema merged commit 662fcc3 into patch-get-method Oct 26, 2022
@alallema alallema deleted the patch-delete-method branch October 26, 2022 14:45
@alallema alallema added skip-changelog The PR will not appear in the release changelogs enhancement New feature or request labels Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request skip-changelog The PR will not appear in the release changelogs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants