Browse Source

feat(dynamite): Support application/javascript response

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/595/head
jld3103 1 year ago
parent
commit
c9ad9648eb
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/dynamite/dynamite/lib/src/openapi_builder.dart

2
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;

Loading…
Cancel
Save