From c9ad9648ebbe2a3269814874199b6730134261a2 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Thu, 17 Aug 2023 21:21:54 +0200 Subject: [PATCH] feat(dynamite): Support application/javascript response Signed-off-by: jld3103 --- packages/dynamite/dynamite/lib/src/openapi_builder.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dynamite/dynamite/lib/src/openapi_builder.dart b/packages/dynamite/dynamite/lib/src/openapi_builder.dart index ac35ef5c..d41ea1f2 100644 --- a/packages/dynamite/dynamite/lib/src/openapi_builder.dart +++ b/packages/dynamite/dynamite/lib/src/openapi_builder.dart @@ -622,7 +622,7 @@ class OpenAPIBuilder implements Builder { dataType = 'Uint8List'; dataValue = '_response.bodyBytes'; dataNeedsAwait = true; - } else if (mimeType.startsWith('text/')) { + } else if (mimeType.startsWith('text/') || mimeType == 'application/javascript') { dataType = 'String'; dataValue = '_response.body'; dataNeedsAwait = true;