removed blob special logic for strings

This commit is contained in:
Tony Tam
2016-11-23 23:40:03 -08:00
parent 23515834e8
commit 3c0fac249f
4 changed files with 4 additions and 24 deletions

View File

@@ -672,17 +672,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
contentType = contentType.split(';')[0].trim();
}
}
if(contentType) {
if(typeof content === 'string') {
var arrayBuffer = new ArrayBuffer(content.length);
var uint8Array = new Uint8Array(arrayBuffer);
for (var i = 0; i < content.length; i++) {
uint8Array[i] = content.charCodeAt(i);
}
content = new Blob([uint8Array], { type: contentType });
}
}
$('.response_body', $(this.el)).removeClass('json');
$('.response_body', $(this.el)).removeClass('xml');