I noticed something, as I am trying to setup a sample Restful API test project using this site - https://jsonplaceholder.typicode.com/. According to the docs on the site, when trying to make a post call I just need to pass the id
, all I need to do is to call the endpoint thus: https://jsonplaceholder.typicode.com/todos/4, this should return this:
{
"userId": 1,
"id": 4,
"title": "et porro tempora",
"completed": true
}
Whenever I pass only the ID in my post call using Python LocustIO, I'm getting 500 server error, it only do return 201, which is success when I add the whole json object like this:
{
"userId": 1,
"id": 4,
"title": "et porro tempora",
"completed": true
}
And secondly when I on this line it will always return :
if sorted(a.items()) == sorted(b.items()):
AttributeError: 'list' object has no attribute 'items'
What's the way forward, as this thread did not solve the problem - Python WordCloud meet AttributeError: 'list' object has no attribute 'items'?