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

fix: unable to set request bodies with colon characters in their names #3178

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pietrygamat
Copy link
Contributor

@pietrygamat pietrygamat commented Sep 23, 2024

Description

Extends #3045. Allows using quotes in bru file to enclose special symbols for bruno keys in the following dictionaries:

headers {
  "multi word header": value
  "this:header": is illegal HTTP header, but bruno can save it
}

body:form-urlencoded {
  "special:param name": value
}

body:multipart-form {
  "special:file-part name": @file(bruno.json)
  "special:text-part name": value
}

fixes #571
fixes #3037
fixes #2810 (alternative to #2898)
fixes #2878 (alternative to #2898)

image
Screenshot from 2024-09-23 20-26-53
Screenshot from 2024-09-23 20-27-23

@SoulKa
Copy link
Contributor

SoulKa commented Sep 23, 2024

What happens if I want to have the value @file(bruno.json) in my multipart form?

@pietrygamat
Copy link
Contributor Author

@SoulKa that part is not touched, so the value will be converted to a file, as it is currently
https://github.com/user-attachments/assets/4862bb1b-7f43-4487-8480-22ae7da0b225

… names query parameters

Automatically quote query parameter keys if they contain characters sensitive for bru syntax: ':', '"', '{', '}' or ' '.
Quoted keys stored in .bru files now support escaping, so it is possible to store keys that themselves contain '"' character.

Fixes usebruno#3037
Fixes usebruno#2810
Fixes usebruno#2878
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment