usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
28.13k stars 1.31k forks source link

[Bug] Request body not cleared in bru file when switching dropdown to 'No Body' #563

Open martinsefcik opened 1 year ago

martinsefcik commented 1 year ago

Request body not cleared in bru file when switching dropdown to 'No Body' when there was previously some body defined.

I am not 100% sure it is bug or it was intentionally implemented like this. But it looks to me as useless information in bru file If I decide to choose 'No Body' option.

shaikshahid98 commented 1 year ago

Hi. I was working on this to find the issue and mean while i found an interesting behaviour. When we change the body type to new one, in request body of the following items, the previous state was not removed. Refer the below pic.

image

In the above image, i have changed the items body type to json from text. Should i raise a new issue of this?

Its-treason commented 1 year ago

Each Body type is saved separately in the .bru file, and I'm 99.9 percent sure it's intentional that the previous body is not cleared.

martinsefcik commented 1 year ago

But why it is there in bru file if it is totally useless for request itself. For example I was duplicating quite a lot POST requests with body to GET requests without body and then I realize that it is not enough to just switch dropdown to No Body If I want to remove body but I have to first remove JSON content and then switch to No Body in case I don't want to have some non relevant body in my GET request.