jala_http 0.5.3
jala_http: ^0.5.3 copied to clipboard
package:http adapter for Jala: capture, one-tap replay, and full throttling (latency, drop, upload and download pacing).
0.5.3 #
- Lockstep release with jala_core 0.5.3 security defaults.
0.5.2 #
- Lockstep release; no functional changes.
0.5.1 #
- Pub metadata:
homepage,issue_tracker, clearer description (docs-only).
0.5.0 #
- Network throttling:
send()consultsJalaBinding.instance .throttleRegistry— a 100%-drop profile throwshttp.ClientException(captured as a normal error entry, taggedthrottledBy: <profileId>) before ever reaching the inner client; otherwise the configured latency (+ jitter) delays the request first. Only applied when a profile is active and the request's host matches the profile's host pattern. - Full bandwidth pacing, both directions: download pacing
(
downloadBytesPerSec) delays each chunk of the response stream tee before it reaches the caller; upload pacing (uploadBytesPerSec) delays each chunk of the finalized request byte stream.package:httpgets the complete throttle treatment (unlikejala_dio, which can only paceResponseType.streamresponses). - Zero overhead when no profile is active: the throttle check is a cheap null/host-pattern check on the existing hot path, no behavior change.
0.4.0 #
- Lockstep release; no functional changes. Bumped for the
jala_core0.4.0 dependency (GraphQL metadata + WebSocket models, unused by this package directly).
0.3.0 #
- Rule-based request mocking: match
JalaMockRegistrybefore the inner client and short-circuit with cannedStreamedResponse, timeout / connection errors, or delay (only when Jala is enabled). - Edit-and-resend:
JalaHttpReplayer.replayModifiedwith method/URL/ headers/body overrides.
0.2.0 #
- First release of the
package:httpadapter for Jala. JalaHttpClient— ahttp.BaseClientwrapper capturing request/response/error events for anyhttp.Clientit wraps, with headers redacted at capture time.JalaHttp.wrap(inner)convenience that wraps a client and registers a replayer for it in one call.JalaHttpReplayer— one-tap in-app replay by rebuilding ahttp.Requestand re-issuing it through the wrapped client, tagging the new entry withreplayOf.- Response bodies are captured via a stream tee: the caller always
receives the complete, unmodified body, while capture buffers at most
maxBodyBytesof it in parallel and reports the true total transferred size. Cancelling the caller's subscription mid-read still completes the store entry with the bytes received so far. - Image responses (
image/*within cap) are captured asBodyKind.image. MultipartRequestis captured as structured@multipartparts (fields + file names/sizes, never file bytes);StreamedRequestbodies stay metadata-only.- Upload/download progress: the request/response tees emit
NetworkProgressEventabout every 64 KB (and on completion). send()checksJalaBinding.instance.isEnabledfirst and is wrapped in try/catch throughout, so a disabled Jala or a capture bug can never affect app networking.