Was looking to get PATCH support included.

It's currently a @todo in the _chr_curl_request_type_option function.

The following seems to work ok for me:

    case 'PATCH':
      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH'); 
      curl_setopt($ch, CURLOPT_POSTFIELDS, $options['data']);     
      $valid_method = TRUE;

I'll look at attaching this as a patch.

Comments

maikeru’s picture

StatusFileSize
new504 bytes
kenorb’s picture

Status: Active » Needs review
leducdubleuet’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm this patch works great to implement the PATCH method.

Thanks @maikeru!

leducdubleuet’s picture

Would it be possible to have this patch committed for the next release please?

fool2’s picture

+1 It would be nice to be able to use chr as a dependency with this included.

fuerst’s picture

Thanks a lot for the patch! Works as expected and really needed.

jonathan webb’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new472 bytes

The code in the patch from maikeru works, but changes the mode of chr.module. I've uploaded an updated patch to remove that mode change.

leducdubleuet’s picture

Status: Needs review » Reviewed & tested by the community

Thanks RTBC

jibus’s picture

Thank you ! Works as expected.

Drupal 7 will become EOL in 2025. Still can someone commit this ?