Browse Source

dynamite: Support application/octet-stream content type

pull/464/head
jld3103 2 years ago
parent
commit
f7d3cb6cd0
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 4
      packages/dynamite/dynamite/lib/src/openapi_builder.dart

4
packages/dynamite/dynamite/lib/src/openapi_builder.dart

@ -622,7 +622,9 @@ class OpenAPIBuilder implements Builder {
); );
state.resolvedTypeCombinations.add(result); state.resolvedTypeCombinations.add(result);
if (mimeType == '*/*' || mimeType.startsWith('image/')) { if (mimeType == '*/*' ||
mimeType == 'application/octet-stream' ||
mimeType.startsWith('image/')) {
dataType = 'Uint8List'; dataType = 'Uint8List';
dataValue = 'response.bodyBytes'; dataValue = 'response.bodyBytes';
} else if (mimeType.startsWith('text/')) { } else if (mimeType.startsWith('text/')) {

Loading…
Cancel
Save