danirod / cartero

Make HTTP requests and test APIs
https://cartero.danirod.es
GNU General Public License v3.0
419 stars 31 forks source link

Preview generated headers #61

Open danirod opened 3 months ago

danirod commented 3 months ago

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.

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

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.