ht 0.6.0
ht: ^0.6.0 copied to clipboard
Fetch-style HTTP types and protocol abstractions for Dart.
0.6.0 #
- BREAKING:
Bodynow extends the platformBlobimplementation and implementsStream<Uint8List>directly; usebodyas a stream or callbody.stream()instead of reading the previousbody.streamgetter. - Added
Body.sizefor exposing known body byte lengths without consuming the body. - Added a public generative
Bodyconstructor so downstream wrappers can extendBodywithout reimplementingBodyInitnormalization. - Fixed
Blobbyte snapshot semantics so byte-backed parts and read buffers are copied consistently across native,dart:io, and js wrappers.
0.5.0 #
- BREAKING:
Request.methodandRequestInit.methodnow useStringvalues instead ofHttpMethod, allowing custom HTTP methods such asPROPFINDwhile keeping Fetch-style normalization and GET/HEAD body checks. - Added
RequestPriorityandRequestInit.priorityfor modeling Fetch request priority hints. - Added body-derived
Content-Typedefaults forRequestandResponseconstruction when typed body init values provide a media type and callers omit the header. - Normalized
Blob,File, andBlob.slice(..., contentType)MIME type inputs with File API semantics. - Fixed wrapped
Responsecopy semantics so init overrides are applied and source body state is not aliased across native,dart:io, and js wrappers.
0.4.2 #
- Aligned native and
dart:ioHeadersiteration with Fetch semantics so repeated non-set-cookieheaders are combined while repeatedset-cookievalues remain separate.
0.4.1 #
- Fixed
dart:ioHeaders(existingHeaders)construction so it copies header entries instead of aliasing the sourceHeadershost.
0.4.0 #
- Hardened native
FormData.parse()multipart/form-dataparsing for real HTTP interop, including quoted boundaries, strict boundary delimiters, duplicate header/parameter rejection,Content-Dispositionvalidation, charset-aware text fields, and RFC 5987-stylefilename*compatibility. - Switched native multipart parsing to stream input chunks instead of eagerly
materializing the whole request body, while keeping parsed file parts on the
existing lazy
Blob/Blockpath. - Fixed multipart boundary handling so boundary-like bytes inside binary payloads, including closing-boundary-like lines and split closing delimiters, are preserved correctly.
- Fixed Fetch constructor invariants for methods and statuses that cannot carry bodies.
- Fixed
URLSearchParams.sort()ordering stability. - Fixed repeated
dart:ioheader values when adapting native headers. - Clarified file body initialization documentation and updated request examples.
- Upgraded the
blockdependency constraint to use the newer file adapter.
0.3.2 #
- Fixed default
FormData.encodeMultipart()boundary generation on js runtimes by avoidingRandom.secure(), which is unavailable under the Dart Node test platform. - Expanded CI test coverage to run the full test suite on VM, Node, and Chrome.
0.3.1 #
- Fixed the broken
Requestconstructor implementation shipped in0.3.0, restoring Fetch-style construction for native,dart:io, and js runtimes. - Fixed wrapped-request rebuilds so
Request(existing, RequestInit(body: ...))replaces the body without incorrectly depending on cloning the consumed upstream request body. - Added regression coverage for native,
dart:io, and jsRequestconstructor/body override semantics.
0.3.0 #
- BREAKING: Aligned
RequestandResponseconstructor/factory parameter semantics with Fetch/Web by introducingRequestInitandResponseInit. - BREAKING: Reworked request/response convenience constructors to use web-aligned positional body/init argument order.
- BREAKING:
Requestnow usesRequestInputfor string/Uri/Requestconstruction, and request metadata now follows Fetch-style inheritance and override rules. - BREAKING:
BodyMixinwas replaced by a first-classBodytype, andRequest.body/Response.bodynow exposeBody?. - BREAKING:
Headers,Blob,Request,Response, andURLSearchParamsnow resolve through platform-specific native/io/js implementations. - BREAKING: Removed older copy-first request/response convenience APIs that no longer matched Fetch/Web semantics.
- Added runtime-backed host adapters for:
Requeston js anddart:ioResponseon js anddart:ioHeaderson js anddart:ioBlobon js anddart:ioURLSearchParamson js
- Added native
FormDataparsing forapplication/x-www-form-urlencodedandmultipart/form-data. - Added native
FormData.encodeMultipart()returningEncodedFormData, with stream, content type, content length, and header application helpers. - Added stream tee and web stream bridge internals to support cloning and host interop without eager body materialization.
- Added browser and
dart:iocoverage for host-backed fetch behavior and multipart parsing edge cases.
0.2.0 #
- BREAKING: Reworked
Blobto ablock-backed implementation and removed synchronousBlob.copyBytes(). - Added direct
Blob<->block.Blockcompatibility (Blobnow implementsBlock). - BREAKING:
Blob.slicenow follows Web Blob semantics (negative indexes are resolved from the end). - BREAKING:
FormData.encodeMultipart()now returns a stream-firstMultipartBody, andMultipartBody.bytesis now async methodbytes(). - Added stream-first
MultipartBodywithstream,contentLength,contentType, and asyncbytes(). - Added
BodyInitsupport forpackage:blockBlockvalues inRequestandResponse.
0.1.0 #
- Rebuilt the package as a fetch-first HTTP type layer.
- Added core protocol types:
HttpMethod,HttpStatus,HttpVersion,MimeType. - Added fetch primitives:
Request,Response,Headers,URLSearchParams,Blob,File,FormData. - Added CI workflow and runnable
example/main.dart. - Upgraded SDK and dependencies to current stable constraints.
- Expanded tests to stabilize API behavior and edge-case contracts.
0.0.0 #
- Initial release.