Wrong response data type in validate
I use the validate API and get the following response content:
"{\"error\": null}"
The problem is that it is a string, but it should be a json.
Complete response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Wed, 09 Aug 2023 09:07:39 GMT
Content-Length: 20
Connection: close
"{\"error\": null}"
In my python code I need to do the following (requests is used):
response_data = response.json()
return json.loads(response_data) # Again a json loads
Note that this issue exists in ICL and WIRE, not in ACH.
Thanks for documenting this @DennyWeinberg. Can you share some steps with us to reproduce the issue?
- open the icl swagger api
- copy the example body on the create api
- do a post on the create api using the example body
- extract the id from the response
- do a post on the validate api using the id
- see that it's not a proper json string but a json string in a string, probably
I imagine its wrongly returned in the rest api wrapper. Somehow the json is text encoded again. I'm sure it's not my mistake because only for icl and wire I need to do the double jaon load, not for icl.
Sorry, I don't have a scratch to prove it just like that.
No worries! Those steps are exactly what I was looking for, thank you.
@mfdeveloper508 can you look at this?
yes, I will take it