File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,12 @@ class ClientMixin {
67
67
68
68
Response prepareResponse(http.Response res, {ResponseType? responseType}) {
69
69
responseType ??= ResponseType.json;
70
+
71
+ String? warnings = res.headers['x-{{ spec .title | lower }}-warning'];
72
+ if (warnings != null) {
73
+ warnings.split(';').forEach((warning) => print(warning));
74
+ }
75
+
70
76
if (res.statusCode >= 400) {
71
77
if ((res.headers['content-type'] ?? '').contains('application/json')) {
72
78
final response = json.decode(res.body);
Original file line number Diff line number Diff line change @@ -67,6 +67,12 @@ class ClientMixin {
67
67
68
68
Response prepareResponse(http.Response res, {ResponseType? responseType}) {
69
69
responseType ??= ResponseType.json;
70
+
71
+ String? warnings = res.headers['x-{{ spec .title | lower }}-warning'];
72
+ if (warnings != null) {
73
+ warnings.split(';').forEach((warning) => print(warning));
74
+ }
75
+
70
76
if (res.statusCode >= 400) {
71
77
if ((res.headers['content-type'] ?? '').contains('application/json')) {
72
78
final response = json.decode(res.body);
You can’t perform that action at this time.
0 commit comments