Skip to content

Commit

Permalink
- Fix analysis issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nwithan8 committed Jan 30, 2023
1 parent d81ab67 commit 8cd08f4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/src/request_elements/http_interaction.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class HttpInteraction extends HttpElement {
factory HttpInteraction.fromJson(Map<String, dynamic> input) =>
_$HttpInteractionFromJson(input);

@override
Map<String, dynamic> toJson() => _$HttpInteractionToJson(this);

http.StreamedResponse toStreamedResponse(Censors censors) {
Expand All @@ -40,7 +41,7 @@ class HttpInteraction extends HttpElement {
reasonPhrase: response.status.message,
contentLength: response.body?.length,
request: http.Request(request.method, request.uri),
headers: censors.applyHeaderCensors(response.headers ?? {}),
headers: censors.applyHeaderCensors(response.headers),
);
return streamedResponse;
}
Expand Down
1 change: 1 addition & 0 deletions lib/src/request_elements/request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Request extends HttpElement {
factory Request.fromJson(Map<String, dynamic> input) =>
_$RequestFromJson(input);

@override
Map<String, dynamic> toJson() => _$RequestToJson(this);

factory Request.fromHttpRequest(http.BaseRequest request, Censors censors) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/request_elements/response.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:dartvcr/src/censors.dart';
import 'package:dartvcr/src/defaults.dart';
import 'package:dartvcr/src/request_elements/status.dart';
import 'package:http/http.dart' as http;
import 'package:json_annotation/json_annotation.dart';
Expand All @@ -24,6 +23,7 @@ class Response extends HttpElement {
factory Response.fromJson(Map<String, dynamic> input) =>
_$ResponseFromJson(input);

@override
Map<String, dynamic> toJson() => _$ResponseToJson(this);

static Future<http.StreamedResponse> toStream(http.Response response, Censors censors) async {
Expand Down
1 change: 1 addition & 0 deletions lib/src/request_elements/status.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ class Status extends HttpElement {
factory Status.fromJson(Map<String, dynamic> input) =>
_$StatusFromJson(input);

@override
Map<String, dynamic> toJson() => _$StatusToJson(this);
}

0 comments on commit 8cd08f4

Please sign in to comment.