mrmason@us.ibm.com
Posts: 3
Joined: Tue Jan 24, 2017 7:08 pm

How can you include form-data in an HTTPConnetor PATCH request

Postby mrmason@us.ibm.com » Thu Aug 03, 2017 7:46 pm

I'm trying to convert the below curl to an HTTPConnector PATH request, but I'm having trouble identifying which field the form-data needs to be included in.


curl --request PATCH \
--url https://plus.dnb.com/v1/monitoring/regi ... n/duns/add \
--header 'accept: application/json' \
--header 'authorization: alphanumerictoken' \
--header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
--form duns=duns.txt

bartonv
Posts: 20
Joined: Wed May 03, 2017 12:10 pm

Re: How can you include form-data in an HTTPConnetor PATCH request

Postby bartonv » Tue Aug 15, 2017 11:49 am

From reviewing the curl request, I presume that you intend to update a certain data resource with the duns.txt content while the Content-Disposition header is expected to be form-data. Is that correct? If so, this can be achieved with the following HTTPConnector setup:

  • URL: https://plus.dnb.com/v1/monitoring/regi ... n/duns/add
  • Request method: PATCH
  • Add input fields as parameters: true
  • Send parameters in: Query
  • Multipart entities: duns (note: using this property requires you to utilize the HTTPConnector input port 0 where you would want to push the path to the duns.txt)
  • Input mapping: you would want to map the $in.0.duns to the duns_EntityContent in order to pass the duns.txt content
  • Raw HTTP Headers: accept: application/json \ authorization: alphanumerictoken \ content-type: multipart/form-data; boundary=---011000010111000001101001
If I misunderstood your question, please provide more details concerning what exactly you are trying to achieve. Thank you.

Best regards,
---
Vladimir Barton
CloverCARE Support
CloverETL | Rapid Data Integration

Visit us online at http://www.cloveretl.com
How to speed up communication with CloverCARE support