Browse Source

Merge pull request #595 from nextcloud/feature/dynamite-javascript-content-type

feat(dynamite): Support application/javascript response
pull/599/head
Kate 1 year ago committed by GitHub
parent
commit
c96b5b6626
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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