add parameter to content requests

This commit is contained in:
Clemens 2016-07-27 10:21:06 +02:00
parent d8a78d9f52
commit 2c3ddb0ecc
2 changed files with 3 additions and 2 deletions

View File

@ -314,6 +314,7 @@ class FlowContent(RequestHandler):
def get(self, flow_id, message):
message = getattr(self.flow, message)
contentview = self.get_argument("content_view", "raw", True)
if not message.raw_content:
raise APIError(400, "No content.")

View File

@ -43,13 +43,13 @@ export var MessageUtils = {
}
return false;
},
getContentURL: function (flow, message) {
getContentURL: function (flow, message, view) {
if (message === flow.request) {
message = "request";
} else if (message === flow.response) {
message = "response";
}
return "/flows/" + flow.id + "/" + message + "/content";
return "/flows/" + flow.id + "/" + message + "/content" + (view ? "?content_view="+view : "");
},
};