Skip to content

Commit feabfc5

Browse files
authored
Fix for #116 (#117)
1 parent db26bcc commit feabfc5

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [5.0.2] - 2021-05-12
8+
### Fixed
9+
- PersistentHandler to implement HttpHandler
10+
711
## [5.0.1] - 2021-05-11
812
### Fixed
913
- Missing http client exports
@@ -192,6 +196,7 @@ the Document model.
192196
### Added
193197
- Client: fetch resources, collections, related resources and relationships
194198

199+
[5.0.2]: https://github.com/f3ath/json-api-dart/compare/5.0.1...5.0.2
195200
[5.0.1]: https://github.com/f3ath/json-api-dart/compare/5.0.0...5.0.1
196201
[5.0.0]: https://github.com/f3ath/json-api-dart/compare/3.2.3...5.0.0
197202
[3.2.3]: https://github.com/f3ath/json-api-dart/compare/3.2.2...3.2.3

lib/src/client/persistent_handler.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ import 'package:json_api/http.dart';
77
/// Handler which relies on the built-in Dart HTTP client.
88
/// It is the developer's responsibility to instantiate the client and
99
/// call `close()` on it in the end pf the application lifecycle.
10-
class PersistentHandler {
10+
class PersistentHandler implements HttpHandler {
1111
/// Creates a new instance of the handler. Do not forget to call `close()` on
1212
/// the [client] when it's not longer needed.
1313
PersistentHandler(this.client, {this.defaultEncoding = utf8});
1414

1515
final Client client;
1616
final Encoding defaultEncoding;
1717

18+
@override
1819
Future<HttpResponse> handle(HttpRequest request) async {
1920
final response = await Response.fromStream(
2021
await client.send(Request(request.method, request.uri)

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: json_api
2-
version: 5.0.1
2+
version: 5.0.2
33
homepage: https://github.com/f3ath/json-api-dart
44
description: A framework-agnostic implementations of JSON:API Client and Server. Supports JSON:API v1.0 (https://jsonapi.org)
55
environment:

0 commit comments

Comments
 (0)