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:
@@ -549,6 +549,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
url = response.request.url;
|
url = response.request.url;
|
||||||
}
|
}
|
||||||
var headers = response.headers;
|
var headers = response.headers;
|
||||||
|
content = content.trim();
|
||||||
|
|
||||||
// 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;
|
||||||
|
|||||||
Reference in New Issue
Block a user