Closed mgratzke closed 6 years ago
I'm going to have to look into this a bit more, as according to the Flask docs there isn't a get_data() method which probably means it's deprecated. I think what should really happen here is:
data = request.get_json()
I'm suspecting a possible Flask version issue here as all is fine when I run it here, but I think the get_json() method should work in any case.
Looks like this is caused by us using an older version of flask internally. Fixed in 94885e827ffca441a1a31429c16be7fc769c3533
I am not a Python expert, but in the file nmosquery / common / routes.py: for the path / subscription /, method "post" (line 65):
shouldn't it be
data = json.loads (request.get_data ())
rather thandata = json.loads (request.data)
I've fixed that for myself locally, and now the query API subscriptions are basically working.