Muhammad Umar Khan
Muhammad Umar Khan

Reputation: 11

integrating Delete Method API with retrofit 2 android with multiple parameters

I am using retrofit 2 for HTTP request in android. The API has delete method implemented and expect 3 parameters I am able to integrate with 1 parameter but could not be able to perform with 3 parameters. While running it on postman the API response is ok

I have tired with one parameter and it is working fine for me

Upvotes: 0

Views: 372

Answers (1)

Sultan Mahmud
Sultan Mahmud

Reputation: 1285

Here is the sample for multiple parameters on the DELETE method:

    @Headers("Accept: application/json")
    @DELETE("/users/{x}/data/{y}/{id}")
    Call<Response> deleteData(
            @Path("x") String x,
            @Path("y") String y,
            @Path("id") String id

    );

Upvotes: 1

Related Questions