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.
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.
cosmetic
property to the KeyValue thingies and render them properly.cosmetic
headers are ignored when sending the request (because the value of the header is taken from the real values themselves).cosmetic
headers are ignored when saving the request to a file.For some cosmetic headers, the value may be fully pregenerated. For instance,
Content-Type: application/json
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.