Skip to content

Upgrading http 0.13 to 1

Breaking0.13.6 → 1.6.0Breaking1Platform2New5Changed5Fixed6Other3

Fetching 13 releases from GitHub…11 / 13
BreakingUpgrade verdict

1 breaking change and 2 platform requirement changes.

  • When sending a request body, the library now only adds a character-set label for text and XML content, matching the web standard.
  • You need Dart 3.3 or newer to use this version.
  • You need Dart 3.2 or newer to use this version.
3 items need code or config changes

Dart SDK requirement changed in 1.3.0: >=2.19.0 <3.0.0 → ^3.4.0.

Breaking1
Changes Request.body so a charset parameter is only added for text and XML media types, aligning with RFC-8259.
Request.body
Platform2
Requires Dart SDK ^3.3.
Requires Dart 3.2.

Generated by DepDelta from published Dart source. Not mixed with prose notes.

  • changed: class BaseClient: abstract implements Client → class BaseClient: abstract mixin implements Client
  • changed: class ByteStream extends StreamView<List<int>> → class ByteStream: final extends StreamView<List<int>>
  • changed: class Client: abstract → class Client: abstract interface
  • changed: get StreamedRequest.sink: EventSink<List<int>> → get StreamedRequest.sink: StreamSink<List<int>>
  • added: class Abortable: abstract mixin implements BaseRequest
  • added: class AbortableMultipartRequest: final extends MultipartRequest with Abortable
  • added: class AbortableRequest: final extends Request with Abortable
  • added: class AbortableStreamedRequest: final extends StreamedRequest with Abortable
  • added: class BaseResponseWithUrl: abstract interface implements BaseResponse
  • added: class RequestAbortedException extends ClientException
  • added: ctor AbortableMultipartRequest(super.method, super.url, {this.abortTrigger})
  • added: ctor AbortableRequest(super.method, super.url, {this.abortTrigger})
  • added: ctor AbortableStreamedRequest(super.method, super.url, {this.abortTrigger})
  • added: ctor RequestAbortedException([Uri? uri])
  • added: extension HeadersWithSplitValues on BaseResponse
  • added: field Abortable.abortTrigger: abstract final Future<void>?
  • added: field AbortableMultipartRequest.abortTrigger: final Future<void>?
  • added: field AbortableRequest.abortTrigger: final Future<void>?
  • added: field AbortableStreamedRequest.abortTrigger: final Future<void>?
  • added: field BaseResponseWithUrl.url: abstract final Uri
  • added: get HeadersWithSplitValues.headersSplitValues: Map<String, List<String>>
  • changed: class RetryClient extends BaseClient → class RetryClient: final extends BaseClient
  • added: static method MockClient.pngResponse({BaseRequest? request}): Response