Skip to content

feat: show request and response headers side by side in Headers tab (v1.0.68)#339

Merged
cedric05 merged 1 commit into
mainfrom
pk-request-headers-and-response-headers
Jun 12, 2026
Merged

feat: show request and response headers side by side in Headers tab (v1.0.68)#339
cedric05 merged 1 commit into
mainfrom
pk-request-headers-and-response-headers

Conversation

@cedric05

Copy link
Copy Markdown
Owner

Summary

  • renderer.tsx: Replace the single-column TableTab for headers with a new HeadersPanel component that renders two equal-width columns side by side — Request Headers on the left, Response Headers on the right. Each column has a clear uppercase title. If either side has no headers, it shows "None" in italic. Added two sub-components: HeadersTable (renders a header/value table) and HeadersPanel (the two-column flex layout).
  • response.ts: Added request_headers?: Headers to DothttpExecuteResponse to type the new field returned by the server.
  • style.css: Added .headers-panel (flex row), .headers-column (flex: 1), .headers-title (bold uppercase label with bottom border), and .headers-empty (italic "None" placeholder) styles.
  • package.json: Bump version to 1.0.68.

Why

Previously the Headers tab only showed response headers. Request headers — including Authorization, Content-Type, custom headers from the .http file, and auto-added headers like User-Agent — were never visible. This makes it much easier to debug requests by seeing both sides at a glance.

Depends on

dothttp-req v0.0.44a33 (PR #426) which adds request_headers to the execute response payload.

Test plan

  • Execute a request with custom headers and verify the Headers tab shows both columns populated
  • Execute a request with no custom headers and verify Request Headers column shows auto-added headers (User-Agent, Accept-Encoding, etc.)
  • Verify the Headers tab still appears/hides correctly based on header presence
  • Verify Response Headers column is unaffected for existing behaviour

…v1.0.68)

Previously the Headers tab only displayed response headers. Request
headers (Authorization, Content-Type, User-Agent, custom headers defined
in the .http file) were never shown in the notebook renderer.

Changes:
- renderer.tsx: replace the single-column TableTab for headers with a
  new HeadersPanel component that renders two equal-width columns side
  by side — "Request Headers" on the left and "Response Headers" on the
  right. Each column has a clear uppercase title. If either side has no
  headers, it shows "None" in italic. The tab's visibility check now
  accounts for either side having headers.
  Added two new sub-components:
    - HeadersTable: renders a header/value table for a given headers map
    - HeadersPanel: the two-column flex layout wrapping two HeadersTable instances
- response.ts: added `request_headers?: Headers` to
  DothttpExecuteResponse to type the new field returned by the server.
- style.css: added .headers-panel (flex row), .headers-column (flex: 1),
  .headers-title (bold uppercase label with bottom border), and
  .headers-empty (italic "None" placeholder) styles.
- package.json: bump version to 1.0.68

Depends on dothttp-req v0.0.44a33 which adds `request_headers` to the
execute response payload (the actual headers sent on the wire via
requests.PreparedRequest).
@cedric05 cedric05 enabled auto-merge (squash) June 12, 2026 07:29
@cedric05 cedric05 disabled auto-merge June 12, 2026 07:29
@cedric05 cedric05 merged commit 94a7f52 into main Jun 12, 2026
9 checks passed
@cedric05 cedric05 deleted the pk-request-headers-and-response-headers branch June 12, 2026 07:29
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

Successfully merging this pull request may close these issues.

1 participant