Complete the code to send a GET request to the API endpoint.
response = client.[1]('/api/users')
The get method sends a GET request to retrieve data from the API.
Complete the code to check if the response status code is 200 (OK).
assert response.status_code == [1]Status code 200 means the request was successful.
Fix the error in the code to parse JSON response correctly.
data = response.[1]()The json() method parses the response body as JSON.
Fill both blanks to send a POST request with JSON data and check the status code.
response = client.[1]('/api/users', json=[2]) assert response.status_code == 201
Use post to send data and provide the JSON payload as a dictionary.
Fill all three blanks to extract the user ID from the JSON response and verify it is greater than zero.
data = response.[1]() user_id = data[[2]] assert user_id [3] 0
Parse JSON, get the 'id' field, and check it is greater than zero.
