Skip to main content
Skip table of contents

createMultipartFormPayload

Versionshinweise

23.1, 22.1.03, 21.2.08

Code

CODE
Entity RestUtils.createMultipartFormPayload(List<MultipartFormEntry> multipartFormEntries)

Beschreibung

Konvertiert die übergebene Liste in Nutzdaten vom Typ "multipart/form-data".

Parameter

  • multipartFormEntries – Die zu konvertierende Liste.

Rückgabe
Die Nutzdaten im form-data-Format.

Beispiele

CODE
Entity formdataPayload = RestUtils.createMultipartFormPayload(List.of(
  RestUtils.createMultipartFormEntry("formKey", "formValue", "text/plain"),
  RestUtils.createMultipartFormDocumentEntry("firstDocument", DocumentUtils.getRestDocument("documentPk")),
  RestUtils.createMultipartFormEntry("secondDocument", fileInputStream, "application/octet-stream", documentName)
));
// Erzeuge target und request...
Response response = RestUtils.post(request, formdataPayload);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.