feat: v0.2 — response insight (A) and request power (B)#11
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements milestone v0.2 from
docs/SPEC.md: bundles A (Response insight) and B (Request power).Backend
RequestSpec+ new bound methodSend(spec)— replaces the ad-hocMakeRequestsignature. Builds a per-requesthttp.ClientfromSettings(timeout, follow-redirects viaCheckRedirect, TLS verify).MakeRequestis kept as a thin wrapper for backward compatibility.RequestResultextended withStatus,StatusText,DurationMs,SizeBytes.json.Indentfailed).SaveTextFilebinding (native save dialog).send_test.gocovering status round-trip, duration & size, timeout enforcement, TLS verify off, redirect-following off, and JSON pretty / non-JSON passthrough.Frontend
A — Response insight
<mark>highlighting.B — Request power
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)
Validated locally
Pre-push hook ran on this push and passed:
go vet,go test(incl. 6 newTestSend*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.