PUT request body for posts endpoint

i tried this but it didn't work. can anyone help?

{ "id": 69255, "user_id": 5166222, "title": "This Side of Paradise", "body": "Off with his head!" }

What is the error your are getting. Can you provide the sample code that you are using

Failed to create user post. Status code:422

TypeError Traceback (most recent call last) Cell In[41], line 37 35 print("Failed to create user post. Status code:422") 36 try: ---> 37 errormessages = response.json()['errors'] 38 for i in range(len(errormessages)): 39 print(f"Error message {i + 1}: {error_messages[i]}")

TypeError: list indices must be integers or slices, not str


Little markdown supported