openmicroservices.org
openmicroservices.org copied to clipboard
Adding support for multipart/form-data
We need to facilitate the movement of data using the Content-Type multipart/form-data.
Spec update
actions:
my_action:
http:
contentType: multipart/form-data
arguments:
my_argument:
in: formBody
What this adds support for
- Support for making requests with the content type set to
multipart/form-data- Each argument will be sent as a form field
AFAICT the spec doesn't allow binary data as of now, so I think we first should add this to the spec before.
actions:
my_action:
http:
contentType: multipart/form-data
arguments:
my_file:
in: formBody
contentType: binary OR image/jpeg # <- this is missing
See e.g.
- https://tools.ietf.org/html/rfc2183
- https://swagger.io/docs/specification/describing-request-body/file-upload/
@wilzbach - according to this, it should be as follows:
arguments:
my_file:
in: formBody
type: object
contentType: */*
This is already supported in output, we can add it to the argument as well.