Preview generated headers
Opened this issue · 3 comments
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.
Hola, Dani. Te llevo siguiendo un tiempo y me ha molado Cartero. ¿Puedo asignarme este issue y ayudar?
No puedo asignármelo yo mismo en aquí en Github, pero he visto que has dicho que está guay que lo pille, así que me lo quedo (si me puedes asignar para el resto de gente, mejor, ¿no?).
Comentario con nota de voz 🤣
Sí, te lo asigno, no problem.