darklynx / request-baskets

HTTP requests collector to test webhooks, notifications, REST clients and more ...
https://rbaskets.in
MIT License
339 stars 52 forks source link

Handling Multipart #88

Closed hirenshah closed 1 year ago

hirenshah commented 1 year ago

Could multipart/form-data be handling in a better way? Showing the content is fine, but maybe provide the option to download the files?

image

darklynx commented 1 year ago

Yes, works as intended.

Originally RequestBaskets was build as a service to test APIs and web-hooks, and not any kind of HTTP traffic/communication. There are no plans to extend the functionality to support binary formats. This would require to change the internal API and storage of collected data.

For example, currently the body of collected requests is stored as string value, which works fine with XML, JSON, HTML, HTTP form encoded parameters, but is incorrect way to store binary data submitted during file uploading.

Same goes for UI, it is build for convenience with simplicity in mind, but not intended to support all variety of application formats used with HTTP protocol. You may use API to get the raw data of requests and then save them anywhere in any format. However, as it was already mentioned above internal structures are not 100% aligned to support any format. In that case body should have been represented as byte array.

Changing that would mean a breaking change for existing services in operation and some major refactoring across backend implementation of service and frontend UI part.