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

Please, trim the fields #1286

Open
1 task done
Aierbote opened this issue Jul 29, 2024 · 2 comments
Open
1 task done

Please, trim the fields #1286

Aierbote opened this issue Jul 29, 2024 · 2 comments

Comments

@Aierbote
Copy link

Aierbote commented Jul 29, 2024

Is there an existing issue for this?

  • I have searched the tracker for existing similar issues and I know that duplicates will be closed

Describe the Issue

Wanna know what's the difference between these two screenshots (1. and 2.)?

Just a trailing whitespace in the first row for 'email ' instead of the correct 'email'

It's a small issue which bugged me, and It was quite easy to spot 1, cause I met a similar case with Postman UI a couple of weeks ago), but lucky for me this one took me much less time to figure it out this time (being an IDE you can spot the space easily, unlike in that other case)

Steps To Reproduce

  1. configure your code for POST request for a field email type string
  2. leave a leading or trailing whitespace by mistake
  3. ???
  4. Unprofit

Screenshots or Videos

1. FIRST SCREENSHOT

Wrong field

2 SECOND SCREENSHOT.
Correct field

Side Note

I hope trimming the fields could be a viable solution for this tiny needle in the haystack, or at very least why not a simple syntax highlight

Footnotes

  1. Ignore the commit info by GitLens, it was just a minor seatback before the weekend break

@Huachao
Copy link
Owner

Huachao commented Jul 30, 2024

@Aierbote thanks for your feedback, one of the goal of my extension is to let user type HTTP request as they wish, so I don't wish to modify or format the content of the request.

@Aierbote
Copy link
Author

Aierbote commented Jul 30, 2024

If a syntax highlight (moderate or with the usual red squiggly lines) I hope it could be possible then to show as the whitespace dots marking indentations

image

Or like trailing whitespace of a line

image

Or like the boundary setting of VS Code "editor.renderWhitespace"

image

Side Note

Speaking of syntax highlight, why not mark this kind of errors

"message": "Expected double-quoted property name in JSON at position 41",
"error": "Bad Request",

When leaving a trailing comma in a body

image

Anyway, thanks for your extension, great job ❤️

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

No branches or pull requests

2 participants