Recent

Author Topic: Patch Request  (Read 281 times)

velle

  • New member
  • *
  • Posts: 7
Patch Request
« on: October 15, 2024, 09:38:03 am »

Hi, I need to use patch using TFPHttpClient but I cant seem to find it in TFPCustomHTTPClient, only the POST, GET, PUT is available.
Is there any alternative that I can use patch for sending request?
I read that it is available on latest FPC version but it is not recommended since it is still unstable.
Thank you in advance!


rvk

  • Hero Member
  • *****
  • Posts: 6572
Re: Patch Request
« Reply #1 on: October 15, 2024, 09:45:11 am »
You can just use TFPHTTPClient.HTTPMethod('PATCH', URL, Response, []);

Or override the class with your own method.
Or make a helper for TFPHTTPClient.Patch.

But the easiest way is to just use HTTPMethod() for now (until you can switch to the latest).


Leledumbo

  • Hero Member
  • *****
  • Posts: 8774
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Patch Request
« Reply #2 on: October 15, 2024, 09:47:44 am »
Is there any alternative that I can use patch for sending request?
All of the convenient methods are wrappers over the generic HTTPMethod:
So just call HTTPMethod with 'PATCH' as the first parameter.

 

TinyPortal © 2005-2018