Merge pull request #1173 from BjRo/handle_whitespace_in_response

Prevent the OperationView to display an error in case the response contains a whitespace only body with content type application/json
This commit is contained in:
Tony Tam
2015-05-08 12:30:01 -07:00

View File

@@ -569,6 +569,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
url = response.request.url; url = response.request.url;
} }
var headers = response.headers; var headers = response.headers;
content = jQuery.trim(content);
// if server is nice, and sends content-type back, we can use it // if server is nice, and sends content-type back, we can use it
var contentType = null; var contentType = null;