Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Patch request using Retrofit2 not working Android

I have created patch request using Retrofit2.

@PATCH("/tests/{id}")
Call<Test> updateTest(@Path("id") int id, @Body Test test);

This request working using Postman. It returns updated JSON of Test class. But it is not working using Retrofit.

Any help ?

like image 609
Khushbu Shah Avatar asked Apr 08 '26 03:04

Khushbu Shah


1 Answers

Add "/" at the end of URL.

@PATCH("/tests/{id}/")
like image 92
Khushbu Shah Avatar answered Apr 09 '26 16:04

Khushbu Shah



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!