Multipart data

When sending an HTTP request, Semarchy xDI can send data as an HTTP multipart request. Each part of the request is content defined with a valid content type.

Configure your metadata

To send messages in a multipart HTTP request, you must add all of them to a request body, under a special node.

  1. In the metadata editor, find an operation node to which you want to add multipart content.

  2. If a Request Body node does not exist already, open the context menu on the operation node, and select New > Request Body to create it.

  3. Open the context menu on the Request Body node, and select New > Multipart. A multipart container node appears.

  4. Open the content menu on the Multipart node, and select New > Part. A part node appears.

  5. Create other part nodes as needed.

  6. For each part node, open its context menu, and select New > Content. A content node appears.

  7. Configure the individual content nodes.

You can create as many part nodes as you want, each with their set of content.

howto multipart metadata

Configure your mapping

In a mapping, you do not need to map anything to the higher-level Multipart node. Instead, map datastores to its nested individual Content nodes.

Create or open a mapping. Add HTTP REST metadata to your mapping, and unfold the HTTP method until you see the multipart content node. Unroll this node until you see the individual content nodes.

Map your datastores to and from the content fields, and their nested elements if applicable.

howto multipart mapping