Skip to content

feat: v0.2 — response insight (A) and request power (B)#11

Merged
dropdevrahul merged 1 commit into
mainfrom
feat/v0.2-response-and-request
Jun 13, 2026
Merged

feat: v0.2 — response insight (A) and request power (B)#11
dropdevrahul merged 1 commit into
mainfrom
feat/v0.2-response-and-request

Conversation

@dropdevrahul

@dropdevrahul dropdevrahul commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Implements milestone v0.2 from docs/SPEC.md: bundles A (Response insight) and B (Request power).

Backend

  • RequestSpec + new bound method Send(spec) — replaces the ad-hoc MakeRequest signature. Builds a per-request http.Client from Settings (timeout, follow-redirects via CheckRedirect, TLS verify). MakeRequest is kept as a thin wrapper for backward compatibility.
  • RequestResult extended with Status, StatusText, DurationMs, SizeBytes.
  • Non-JSON response bodies are now returned verbatim (previously the body was dropped if json.Indent failed).
  • New SaveTextFile binding (native save dialog).
  • New send_test.go covering status round-trip, duration & size, timeout enforcement, TLS verify off, redirect-following off, and JSON pretty / non-JSON passthrough.

Frontend

A — Response insight

  • Status chip beside the Response heading, colored by class (2xx green / 3xx blue / 4xx amber / 5xx red).
  • Inline duration and size (134 ms · 2.4 KB).
  • Pretty / Raw toggle on the body tab.
  • Search-in-response with match count and <mark> highlighting.
  • Copy and Save body buttons.

B — Request power

  • Params builder (key/value rows) two-way synced with the URL field.
  • Auth: None / Bearer / Basic / API key (header or query target).
  • Body selector: None / JSON (with a Format button) / Form (rows) / Raw. Content-Type defaults set automatically for JSON and Form.
  • Per-request Settings: timeout, follow redirects, verify TLS.
  • Copy as cURL action (mirrors cURL import).

Layout

The request editor is now one tabbed panel: Headers / Params / Body / Auth / Settings. Per-tab parallel-array state preserved (per the CLAUDE.md warning) and updated in lockstep in addNewTab/closeTab.

Deferred to v0.3 (per spec)

  • Multipart / file-upload body type.
  • Iframe HTML preview tab.

Validated locally

Pre-push hook ran on this push and passed: go vet, go test (incl. 6 new TestSend* cases), golangci-lint, frontend lint + build — all green.

Notes

One open spec question is resolved: bodies in v0.2 are None / JSON / Form / Raw; multipart deferred to v0.3 to keep this milestone lean. The other three (store backend, secrets at rest, sidebar vs command-palette) are C/D concerns and remain open.

Implements milestone v0.2 from docs/SPEC.md.

Backend
- Introduce structured RequestSpec (method, url, headers, body, settings)
  and a new Send(spec) bound method. Builds a per-request http.Client from
  Settings: timeout, follow-redirects (CheckRedirect), TLS verify.
- Extend RequestResult with Status, StatusText, DurationMs, SizeBytes.
- Non-JSON response bodies are now returned verbatim instead of dropped
  on json.Indent failure.
- Keep MakeRequest as a thin wrapper around Send for backward compat.
- Add SaveTextFile binding (used by Save body) via runtime.SaveFileDialog.
- New send_test.go covering: status/text round-trip, duration & size,
  timeout, TLS verify off, redirect-following off, JSON pretty + plain.

Frontend
- Response insight (A): status chip colored by HTTP class, duration,
  size formatter (B/KB/MB), Pretty/Raw body toggle, search-in-response
  with match count and <mark> highlighting, Copy & Save body buttons.
- Request power (B):
  - Query params builder, two-way synced with the URL field.
  - Auth: None / Bearer / Basic / API key (header or query target).
  - Body types: None / JSON (with Format button) / Form / Raw.
  - Per-request Settings: timeout, follow redirects, verify TLS.
  - Copy as cURL.
- Request editor reorganized into one tabbed panel (Headers / Params /
  Body / Auth / Settings).
- New shared helpers: kv (key/value rows), formatters, auth, settings,
  url-sync, curl-builder. Reusable KVRow replaces the per-purpose
  RequestHeader component (deleted).
- Wails bindings regenerated.

Deferred to v0.3 per spec: multipart / file uploads, iframe HTML preview.
@dropdevrahul dropdevrahul merged commit 398cb07 into main Jun 13, 2026
3 checks passed
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