Skip to content
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. #1482

Closed
ash-eng-spin opened this issue Feb 22, 2024 · 5 comments
Labels
feature request New feature or request

Comments

@ash-eng-spin
Copy link

When setting up a multipart request, Thunder Client 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 file part or text part of a multi-part request.

Form Fields: user should be able to set because this could application/json, application/xml, text/plain, blank 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. Thunder Client 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 Thunder Client.

image

Versions

ThunderClient v.2.17.8
Visual Studio Code 1.86.2
OS: Windows_NYx64 10.0.22621

Steps to reproduce 1

  1. Create POST request
  2. Go to Body > Form > Form Fields
  3. Enter field name and value <---User cannot change content-type of the file

Steps to reproduce 2

  1. Create POST request
  2. Go to Body > Form
  3. Select Files check box
  4. Go to Files section
  5. Enter field name and value <---User cannot change content-type of the file

For reference this is how it works in Postman:

image

Free Version - can't move to paid until this is a feature. It's a show stopper for us.

@ash-eng-spin ash-eng-spin added the feature request New feature or request label Feb 22, 2024
@rangav
Copy link
Collaborator

rangav commented Feb 22, 2024

Hi @ash-eng-spin

Thanks for the feedback.

Can you share your company details using below form.
https://www.thunderclient.com/contact

@rangav
Copy link
Collaborator

rangav commented Feb 24, 2024

@ash-eng-spin

Here is the proposed solution in the next update - you can append content-type to the field names

Let me know your feedback

Screenshot 2024-02-24 at 17 39 52

@rangav
Copy link
Collaborator

rangav commented Feb 26, 2024

This feature is implemented and published to the marketplace, please update to v2.18.0

See all features in this update
https://github.com/rangav/thunder-client-support/releases/tag/v2.18.0

Please test and let me know your feedback.

@rangav rangav closed this as completed Feb 26, 2024
@ash-eng-spin
Copy link
Author

Thanks! This is working great. Also impressed that the content-types are importing from Postman collections.

I was worried that without a separate field a user might not be able to distinguish how to get their content-type applied, but I see you have linked a how-to on the screen, so that's nice.

@rangav
Copy link
Collaborator

rangav commented Feb 26, 2024

Thanks for the confirmation 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants