Engage Voice | How do I send a form-data payload
in an IVR Studio WWW node?

Last updated on June 30, 2021

Table of contents

The WWW node does not support a ‘form data’ payload natively, but you can use the workaround described in this article to send form data with the WWW node. When a server expects form data, you can send that data by specifying custom HTTP headers and a proper body.
Follow the steps listed in Using a WWW node to add a WWW node, but select Plain Text in the Format dropdown when configuring it.
To instruct the server on how to parse the payload, you will specify a boundary parameter in the Content-Type header. You can use a long arbitrary string as the value for the boundaries. In this example of body content, we’ll use ‘--------------------------947261792745627008558762’ as the arbitrary string.
Content-Disposition: form-data; name="data"
{ "accountId": "12345678910", "brand": "SofteeTowel", "agentName": "Lorem Ipsum", "callStartTime": "2020-08-26", "callStopTime": "2020-08-26", "callNotes": "Call went well.", "optOut": false, "campaignId": "12345678910", "campaignName": "Text campaign", "campaignActivityList":["Text test","test"], "campaignCustom": "Send two large towels", "brandImpression": "Positive" }

Adding custom headers

1. Click on the Custom HTTP Headers tab.
2. Click on the Add new button to fill out your first custom HTTP header.
3. Fill out the fields exactly, or with values that correspond to the code you’re using in your body content:

a. Name: Content-Type

b. Type: Fixed Value

c. Mapping: multipart/form-data; boundary=--------------------------947261792745627008558762

4. Click on the Add new button to fill out your second custom HTTP header.

a. Name: Content-Disposition

b. Type: Fixed Value

c. Mapping: form-data; name="data"

5. Click OK.
© 1999-2022 RingCentral, Inc. All rights reserved.
We've sent you a link, please check your phone!
Please allow a full minute between phone number submissions.
There was an issue with SMS sending. Please try again. If the issue persists, please contact support.