jala_http 0.3.0
jala_http: ^0.3.0 copied to clipboard
package:http adapter for Jala, the in-app Flutter network inspector. Wraps any http Client to capture requests, responses, and errors, with one-tap replay.
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.