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

option for setting the type of body param #2775

Open
1 task done
celestialcato opened this issue Aug 7, 2024 · 6 comments
Open
1 task done

option for setting the type of body param #2775

celestialcato opened this issue Aug 7, 2024 · 6 comments

Comments

@celestialcato
Copy link

I have checked the following:

  • I've searched existing issues and found nothing related to my issue.

Describe the feature you want to add

There should be an ability to select in which type the body parameters are being sent. Currently all stored environment variables are sent as strings which the API backend might not accept.

Mockups or Images of the feature

A simple selection menu for each body param and ideally for each environment variable would solve the proplem.

@celestialcato celestialcato added the enhancement New feature or request label Aug 7, 2024
@jwetzell
Copy link
Contributor

jwetzell commented Aug 7, 2024

What body type are you referring to for this?

@celestialcato
Copy link
Author

Here's what I mean:
Screenshot 2024-08-08 121724

as you can see the server expects the values in multipart form body of the request to be sent according to the type that it expects.

Screenshot 2024-08-08 121815

the variable SAMPLE_USER_ID was set in environment variables and when it's retrieved to be sent in the request body, it's interpreted as a string.

having the option to set the type of sent body parameters in environment variables and directly for each body parameter would help a lot.

@jwetzell
Copy link
Contributor

jwetzell commented Aug 8, 2024

I am pretty sure multipart/form-data bodies only support strings and files. That is not something Bruno can fix.

@celestialcato
Copy link
Author

oh well I looked at a couple of other http clients and guess you're right, however this issue only happens for me with saved environment variables. It seems so that when sending the request Bruno wraps whatever is inside environment variables in what I assume is double quotation marks which causes the server to interpret them as strings. This won't happen however when the value is given directly without the use of variables:

Screenshot 2024-08-08 192414

@jwetzell
Copy link
Contributor

jwetzell commented Aug 8, 2024

I understand now.

@brahma-dev
Copy link
Contributor

It's happening because Bruno does not yet replace variables in multipart/form-data. Bruno sends {{SAMPLE_USER_ID}} not 1.

Relevant PR: #1217

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

No branches or pull requests

5 participants