You can include response body in analytics by using the atatus.set_response_body()
function.
Syntax
atatus.set_response_body(value)
Parameter
Parameter | Type | Description |
---|---|---|
value | String (Required) | Response body can have any value in string. |
Example
copy
import atatus
import json
responseBodyDict = {
"name": "Make it big",
"path": "/api/users/1",
"plan": "Premium",
"limit": 476189,
"timestamps": {
"created_at": "2022-06-08T19:29:36.513+00:00",
"updated_at": "2022-06-28T17:42:12.513+00:00"
}
}
atatus.set_response_body(json.dumps(responseBodyDict))