cancel
Showing results for 
Search instead for 
Did you mean: 

Does Swagger Editor supports Multiparts Custom Headers ?

jberger
New Member

Does Swagger Editor supports Multiparts Custom Headers ?

Hi all !

I'm using swagger Editor v3.16.3.
I tried the sample of code from https://swagger.io/docs/specification/describing-request-body/multipart-requests/ in order to add custom headers to my file parts.

The custom header is not displayed in the try-out area of swagger ui, and is not sent at all.

 

Could you tell me if it is due to the swagger editor I'm using ?

 

Also the final goal was to send the Content-Length Header for each part of the form. Do you have any better advice to achieve this ?

 

Thanks in advance,

 

Regards,

 

Ju'

1 REPLY 1
HKosova
Moderator

Re: Does Swagger Editor supports Multiparts Custom Headers ?

Hi @jberger,

 

Custom headers defined in the "encoding" attribute are not supported in "try it out" yet. You can follow this issue for status updates:

https://github.com/swagger-api/swagger-ui/issues/5356

 

As for Content-Length, RFC 7578 says:

>>

The multipart/form-data media type does not support any MIME header fields in parts other than Content-Type, Content-Disposition, and (in limited circumstances) Content-Transfer-Encoding. Other header fields MUST NOT be included and MUST be ignored.

<<

so this is not supported.

 


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video: