Expand my Community achievements bar.

SOLVED

How to build a PATCH method service?

Avatar

Level 2
Hello, I am creating some services to connect to some endpoints, the problem is that I need to do it for one with the PATCH method and I don't know how to do it because until now I have only worked with the GET and POST methods. , is there any guide or way to understand how to do it? Thank you very much and greetings!

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 6

Hi, the PATCH call is similar to the POST call. The PATCH API call is used to partially update an existing resource on the server. There's not much difference in the methods as well. You can use HttpPatch class instead of HttpPost when dealing with PATCH requests. All the things will remain same, just use the HttpPatch class object everywhere.

View solution in original post

3 Replies

Avatar

Correct answer by
Level 6

Hi, the PATCH call is similar to the POST call. The PATCH API call is used to partially update an existing resource on the server. There's not much difference in the methods as well. You can use HttpPatch class instead of HttpPost when dealing with PATCH requests. All the things will remain same, just use the HttpPatch class object everywhere.

Avatar

Administrator

@LidermanGiraldoEscobar  Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni