Skip to content

Add no-arg close_idle_connections! + document form-body decoding (#1118, #1123, #1137)#1279

Merged
quinnj merged 1 commit into
masterfrom
jq-queryparams-docs-closeall
Jun 4, 2026
Merged

Add no-arg close_idle_connections! + document form-body decoding (#1118, #1123, #1137)#1279
quinnj merged 1 commit into
masterfrom
jq-queryparams-docs-closeall

Conversation

@quinnj
Copy link
Copy Markdown
Member

@quinnj quinnj commented Jun 4, 2026

Resolves #1118, #1123, #1137 — three related triage outcomes from the same area, bundled.

#1137 — closing cached connections

The 1.x complaint was that closeall emptied the pool without closing the connections. In 2.0 close_idle_connections!(transport) already closes them — but it required a Transport you own, with no way to reach the default pool used by HTTP.get/HTTP.post/etc.

Adds two overloads:

  • HTTP.close_idle_connections!() — closes the default client's idle connections (no-op if no request has been made yet)
  • HTTP.close_idle_connections!(client) — closes a specific client's pool

and expands the docstring to document all three forms.

#1118 / #1123 — decoding form bodies / getting POST params

These asked for a way to decode application/x-www-form-urlencoded bodies (#1118) and read POST params easily (#1123). The capability already exists: HTTP.queryparams decodes + (and %20) as space, so HTTP.queryparams(String(req.body)) parses a form body and round-trips the Dict/NamedTuple encoding HTTP.post produces. The gap was discoverability — this adds a "Reading POST form parameters on the server" example to the client guide.

Tests

  • close_idle_connections!() / (client) clear the pool (idle count → 0).
  • queryparams(String(_form_urlencode(dict))) == dict round-trip, incl. + and %20.
  • http_forms_tests 134/134 and http_client_transport_tests 90/90 locally.

🤖 Generated with Claude Code

…, #1123, #1137)

#1137: add `close_idle_connections!()` (closes the default client's pool) and
`close_idle_connections!(client)` overloads, so callers can clear cached
connections without owning a Transport. The existing Transport method already
closes (not just discards) connections.

#1118/#1123: document that `HTTP.queryparams` decodes
`application/x-www-form-urlencoded` bodies -- it treats `+` (and `%20`) as space
-- so it round-trips the Dict/NamedTuple form encoding `HTTP.post` produces. Adds
a server-side "Reading POST form parameters" docs example.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.73%. Comparing base (192978d) to head (fa2cee9).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1279      +/-   ##
==========================================
+ Coverage   84.57%   84.73%   +0.16%     
==========================================
  Files          28       28              
  Lines       10759    10767       +8     
==========================================
+ Hits         9099     9123      +24     
+ Misses       1660     1644      -16     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@quinnj quinnj merged commit 69524bb into master Jun 4, 2026
8 checks passed
@quinnj quinnj deleted the jq-queryparams-docs-closeall branch June 4, 2026 16:31
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.

Support decoding of application/x-www-form-urlencoded forms

1 participant