<div dir="ltr"><div>I have a question on the returned parameter from the following method: <u>BaseProcessor.execute()</u>,</div><div>and how it is used from <u>API.execute_process()</u>.</div><div><br></div><div>The inline documentation for <u>BaseProcessor.execute()</u> says: "<u>returns: tuple of MIME type and process response</u>"</div><div>What I am interested in is the "<u>process response</u>".<br></div><div></div><div><br></div><div><u>BaseProcessor.execute()</u> is called by <u>BaseManager.execute_process()</u> (indirectly through <u>_execute_handler_sync()</u> ),</div><div>which pass back to the caller (<u>API.execute_process()</u> ) the "<u>process response</u>" unchanged.</div><div><br></div><div>If the <u>execute-request</u> had the parameter <u>"response": "raw"</u> or undefined (whch defauls to <u>"raw"</u>),</div><div>then <u>API.execute_process()</u>, if <u>mime_type == 'application/json',</u></div><div>assumes the "<u>process response</u>" (i.e. actual variable <u>response</u>) is an object, and <b>converts the object to a string</b> to be returned as <u>content</u>,</div><div>in all other casesĀ  <u>API.execute_process()</u> returns the originalĀ "<u>process response</u>" unchanged (i.e. assuming it is a string).<br></div><div><br></div><div>To my understanding <b>the above is not correct</b>:</div><div>if the mime_type = 'application/json' then the "process response" <b>should be a string</b> representing an object, <b>not an object</b>.</div><div>Even more: any "<u>process response</u>" returned by <u>BaseProcessor.execute()</u> should be a <b>string</b>, coded according to the <u>mime_type</u>,</div><div>and in case of an <u>execute-request</u> with <u>"response"="raw"</u>, the "<u>process response</u>" should be returned unchanged as "<u>content</u>" from  <u>API.execute_process()</u>.</div><div><br></div><div>Specifically about Mime application/json: "This file type is a data interchange format that is text-based" (ref. <a href="https://mimeapplication.net/json">https://mimeapplication.net/json</a>)</div><div><br></div><div><br></div><div></div><div>In any case I would like to have some feedback in case I missed something,<br></div><div>before rising the above as a bug issue.</div><div><br></div><div>I would also propose to specify in the inline documentation for <u>BaseProcessor.execute()</u> the types of the returned items into the tuple (string, string):</div><div><br></div><div><br></div><div>Thank you,</div><div>Francesco<br></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><br></div></div></div></div></div></div>