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

Preview generated headers #61

Open
4 tasks
danirod opened this issue Aug 5, 2024 · 0 comments
Open
4 tasks

Preview generated headers #61

danirod opened this issue Aug 5, 2024 · 0 comments
Milestone

Comments

@danirod
Copy link
Owner

danirod commented Aug 5, 2024

Since some panels generate their own headers (the body generates a Content-Type, the authorization may generate an Authorization...), previewing some read-only headers in the Headers tab may be useful.

These headers are just cosmetic and presented in the Headers tab. So the KeyValueItem and friends should receive a new property called "cosmetic", which makes them read only and non-serializable, since the header should not end in the files.

  • Add a cosmetic property to the KeyValue thingies and render them properly.
  • Assert that cosmetic headers are ignored when sending the request (because the value of the header is taken from the real values themselves).
  • Assert that cosmetic headers are ignored when saving the request to a file.
  • Assert that the user can still overwrite the value of a cosmetic header by adding a new header with the same name (the cosmetic header shall be strikethrough as well).

For some cosmetic headers, the value may be fully pregenerated. For instance,

  • A body of type JSON may already have Content-Type: application/json
  • An authorization header of type Bearer may already have Authorization: Bearer 12341234

However, this is not true for every cosmetic header, because some of them only get generated when the request is submitted. Multipart requests do this because the boundary has to be generated on demand to prevent conflicts with the payload.

@danirod danirod added this to Cartero Aug 5, 2024
@danirod danirod moved this to To Do in Cartero Aug 5, 2024
@danirod danirod added this to the 0.2 milestone Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To Do
Development

No branches or pull requests

1 participant