Untitled

mail@pastecode.io avatar
unknown
plain_text
10 days ago
527 B
3
Indexable
Never
# GET all users
make_request(f"{base_url}/users")

# GET a specific user
make_request(f"{base_url}/users", params={'id': '3'})

# GET all products
make_request(f"{base_url}/products")

# GET a specific product
make_request(f"{base_url}/products", params={'id': 1})

# Try to GET a non-existent user
make_request(f"{base_url}/users", params={'id': 999})

# DELETE a specific product
make_request(f"{base_url}/products", method='DELETE', params={'id': 1})

# GET all products (after deletion)
make_request(f"{base_url}/products")
Leave a Comment