-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-part requests: user should be able to set content-type for each part in a multi-part request. #1602
Comments
…r each part in a multi-part request (usebruno#1602) If a parameter is a valid json, it automatically sets the Content-Type application/json for that parameter
Hi, We have the same problem indeed especially for parameters in JSON format. |
We are facing the same issue. This is the single feature missing so we can fully migrate to Bruno. |
We had the same issue. Hope the change provided by @busy-panda will be approved quickly. |
Sorry I closed my PR because I prefer to fully implement as suggested by @ash-eng-spin, so I will add a column "Content-Type". That will probably take more time. |
… for each part in a multi-part request. usebruno#1602
The enhancement is fully implemented and the PR was created: #2121 |
… for each part in a multi-part request. usebruno#1602
… for each part in a multi-part request. usebruno#1602
commit cdf56fc Merge: f27e79c 16861c9 Author: busy-panda🐼🐼 <[email protected]> Date: Wed Apr 24 11:47:07 2024 +0200 Merge branch 'usebruno:main' into feature/1602-multipart-content-type commit f27e79c Merge: 40872f6 59ffb01 Author: busy-panda🐼🐼 <[email protected]> Date: Sat Apr 20 10:25:02 2024 +0200 Merge branch 'usebruno:main' into feature/1602-multipart-content-type commit 40872f6 Author: busy-panda <[email protected]> Date: Fri Apr 19 17:14:44 2024 +0200 Reduced the width of the Operator column in tab Assert commit b7f4eda Author: busy-panda <[email protected]> Date: Fri Apr 19 17:08:38 2024 +0200 Reduced the width of the Operator column in tab Assert commit 8e99ed3 Author: busy-panda <[email protected]> Date: Fri Apr 19 17:06:49 2024 +0200 moved assertions from Tests panel to Assert panel and commit c3c91d6 Author: busy-panda <[email protected]> Date: Fri Apr 19 15:01:41 2024 +0200 added placeholder support to MultiLineEditor component commit 39f60da Author: busy-panda <[email protected]> Date: Thu Apr 18 15:43:09 2024 +0200 feature: Multi-part requests: user should be able to set content-type for each part in a multi-part request. usebruno#1602
I had a case where I needed to send in a multi-part form a file item and a JSON item. |
Thank you for sharing. I just tested and it worked for me as well. Good option until we can manually/individually set the content-type. |
…t-type feature: Multi-part requests: user should be able to set content-type for each part in a multi-part request. #1602
When setting up a multipart request, Bruno automatically selects the content-type of the file part. The auto-assigned content-type is not always the desired content-type of the API spec, therefore our request will always result in a 400 Bad Request, because the content-type is wrong.
Please allow a way for the user to set the content type for a multi-part request part. File or text
Text/Param: user should be able to set because this could be blank, application/json, application/xml, text/plain or many other things.
Files: user should be able to set because this could be blank, application/pdf, application/octet-stream, application/vnd.ms-excel, text/csv or many other things.
Example: Multipart Form Data: PDF file content-type automatically set. No manual way for user to set content-type for a file.
Why is this a problem: API spec for the pdf file wants "application/octet-stream" for the content-type. Bruno automatically sets the content-type to "application/pdf". No way to manually set the content-type. Results in 400 bad request because content-type does not match API spec and there is no way to change in Bruno.
This appears to align with your plans to update the Bru Lang Schema #1502 but I want to make sure the user can set the content-type in the UI for params and files.
Versions
v1.9.0
Steps to reproduce 1
Steps to reproduce 2
For reference this is how it works in Postman:
The text was updated successfully, but these errors were encountered: