Problem/Motivation

Some remote systems (CRMs, etc.) only service certain API functions when data is received via the PUT method rather than POST. An example of this is NationBuilder's API. Its Create Contact endpoint uses POST but its Update Contact endpoint uses PUT.

Proposed resolution

Add support for the PUT method in the Handler component of the Webform module. Currently it supports POST and GET.

I note that Guzzle has support for the PUT method.

CommentFileSizeAuthor
#3 2992729-3.patch14.7 KBjrockowitz

Comments

John Twyman created an issue. See original summary.

jrockowitz’s picture

Status: Active » Needs review

@John Twyman Welcome to the Drupal Community

I wanted the say "Hello" and encourage you to learn more about...

Watch video about helping us help you

jrockowitz’s picture

StatusFileSize
new14.7 KB

  • jrockowitz committed 0357df7 on 8.x-5.x
    Issue #2992729 by jrockowitz: Add support for PUT method in Handler
    
  • jrockowitz committed ed86af2 on 8.x-5.x
    Issue #2992729 by jrockowitz: Add support for PUT method in Handler
    
jrockowitz’s picture

Status: Needs review » Fixed

I committed the patch. Please download the latest dev release to review.

john twyman’s picture

Hi Jacob,

I've downloaded and tested the latest dev copy and can confirm that the patch does indeed work as expected.

I've used a RequestBin instance locally to capture PUT method data in both JSON and x-www-form-urlencoded formats. Both have looked as I'd expect.

Thanks very much for this.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.