Add Content-Type header to HTTP responses for JSON data.#30
Add Content-Type header to HTTP responses for JSON data.#30benmkent wants to merge 7 commits intoUM-Bridge:mainfrom benmkent:html-explicit-json
Conversation
Update fork to just use a single branch
|
@thealanjason I created a new branch as in my fork the other pieces are a bit tangled up. This is should update all the HTTP responses to explicitly specify the content type is JSON, and MATLAB will understand the responses. |
|
Hi @benmkent thanks for creating a new PR! Could you please:
I've added a separate issue to add tests to check for the "Content-Type" in the header, which can be worked upon later when this is uniformly implemented for all languages that UMBridge supports. |
|
I have messed up the branch and I have not got time to fix this at the moment due to starting a new position on Monday, I will address this in the future. It might be possible to fix the JSON issues directly from the MATLAB side, in line 19-24 of the HTTPModel class. I believe this is where MATLAB gets confused about the content type using the "send" function. |
Adds explicit JSON type to HTTP responses to address #23 .
To achieve this, successful responses must be explicitly given the HTTP status code 200.