Home > Forum > General > Invoke REST Web Service – multipart file upload without JSON part

Invoke REST Web Service – multipart file upload without JSON part
0

Hi,

I'm trying to call an API endpoint that expects a standard multipart/form-data request containing only a file part:

--boundary
Content-Disposition: form-data; name="file"; filename="document.pdf"
Content-Type: application/pdf

[binary data]

When using Invoke REST Web Service → Body type: Multipart, WEBCON always adds an additional JSON part before the binary part, even if JSON part value is empty:

--boundary
Content-Type: application/json; charset=utf-8


--boundary
Content-Disposition: form-data; name="file"; filename="document.pdf"
Content-Type: application/pdf

[binary data]

I verified the behavior independently against the same endpoint:

multipart request with only the file part → HTTP 200, upload successful
same request with an additional empty JSON part → HTTP 400, FILE_REQUIRED

Using {} as JSON part value or giving the JSON part a Content-Disposition/name does not change the result.

Is there any way in WEBCON to omit the JSON part completely and send a multipart request containing only the binary/file part?

If this is currently not possible, could this be considered for enhancement?

Nobody has replied in this thread yet.