Skip to content

Wire java.net.http send/sendAsync to the socket layer - #4

Merged
yogthos merged 1 commit into
mainfrom
wire-net-http-send
Jun 27, 2026
Merged

Wire java.net.http send/sendAsync to the socket layer#4
yogthos merged 1 commit into
mainfrom
wire-net-http-send

Conversation

@yogthos

@yogthos yogthos commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Builds on #3 (the construction shim). send/sendAsync now perform the request over the same socket/TLS machinery clj-http-lite uses, so the cognitect aws-api java backend makes real requests: (.sendAsync client req handler).thenApply/.exceptionally deliver {:status :body :headers} to the channel. sendAsync returns an already-settled future (the request runs synchronously). The request builder captures the body publisher; BodyHandlers.ofString/ofByteArray select the response body type.

conn-ex/throw-typed now build their typed throwable via jolt.host/throwable (a new jolt seam) so .getMessage/ex-message work alongside (class e)/instance? — the aws backend reads .getMessage.

clj-http-lite suite stays green (60/116). Needs jolt with the jolt.host/throwable seam (jolt PR #245).

The HttpClient shim covered construction; now send/sendAsync actually perform
the request over the same connect/build-request/parse-response machinery
clj-http-lite uses. send is synchronous; sendAsync runs the request and returns
an already-settled future whose thenApply/exceptionally apply immediately —
enough for the cognitect aws-api backend, which does (.sendAsync client req
handler) then .thenApply/.exceptionally. The request builder now captures the
body publisher, and BodyHandlers.ofString/ofByteArray pick the response body
type.

conn-ex / throw-typed now build their typed throwable via jolt.host/throwable
instead of a hand-rolled :jolt/ex-info table, so .getMessage / ex-message work
(the aws backend reads .getMessage) alongside (class e) / instance?.

clj-http-lite suite stays green (60/116); the aws java backend now makes real
requests.
@yogthos
yogthos merged commit 7488b84 into main Jun 27, 2026
2 of 4 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