optic icon indicating copy to clipboard operation
optic copied to clipboard

Feature: support multipart/form-data in requests

Open LouManglass opened this issue 5 years ago • 2 comments

Similar to Issue #204 in expanding encoding types for request payloads

Community request to support multipart/form-dataencoding type in requests when building the API specification. In particular, this encoding type is a way to upload chunks such as sending files in POSTs, and we should be able to recognize files when shape hashing as well.

LouManglass avatar Mar 09 '21 16:03 LouManglass

I was talking with @LouManglass about the topic yesterday, for my use case the multi-part form data should ideally be handled similarly to json.

So the current state is:

Request Body > multipart/form-data

String

Suggested state:

Request Body > multipart/form-data

$name: $ContentType   $UserDescription <- UserDescription can be filled via the UI
$name: $ContentType   $UserDescription
[...]

Example

Request Body > multipart/form-data

file: application/octet-stream   The file sent by the user
description: plain/text   Description that belongs to the file

otruffer avatar Mar 10 '21 07:03 otruffer

This feature is of interest to us too. We post requests as application/x-www-form-urlencoded but similar to the above.

kpr4b avatar Jul 14 '21 13:07 kpr4b