import requests
import json

# GET todos
print("running GET...")
get_response = requests.get('http://localhost:4567/projects/1/categories')
parsed = json.loads(get_response.text)
print("GET response:")
print(json.dumps(parsed, indent=4, sort_keys=False))

# HEAD todos
print("running HEAD...")
head_response = requests.head('http://localhost:4567/projects/1/categories')
print("HEAD response:")
print(head_response.headers)

# POST todos
item = {
    'id': 2,
}

print("running POST...")
post_response = requests.post('http://localhost:4567/projects/1/categories', json = item)
print("POST response:")
parsed = json.loads(post_response.text)
print(json.dumps(parsed, indent=4, sort_keys=False))

# Check new item
print("Checking new item")
print("running GET...")
get_response = requests.get('http://localhost:4567/todos')
parsed = json.loads(get_response.text)
print("GET response:")
print(json.dumps(parsed, indent=4, sort_keys=False))
ca62c03b018681af76869e43fc38bc8d6338a1bf
<mask token>

<mask token>
print('running GET...')
<mask token>
print('GET response:')
print(json.dumps(parsed, indent=4, sort_keys=False))
print('running HEAD...')
<mask token>
print('HEAD response:')
print(head_response.headers)
<mask token>
print('running POST...')
<mask token>
print('POST response:')
<mask token>
print(json.dumps(parsed, indent=4, sort_keys=False))
print('Checking new item')
print('running GET...')
<mask token>
print('GET response:')
print(json.dumps(parsed, indent=4, sort_keys=False))

<mask token>
print('running GET...')
get_response = requests.get('http://localhost:4567/projects/1/categories')
parsed = json.loads(get_response.text)
print('GET response:')
print(json.dumps(parsed, indent=4, sort_keys=False))
print('running HEAD...')
head_response = requests.head('http://localhost:4567/projects/1/categories')
print('HEAD response:')
print(head_response.headers)
item = {'id': 2}
print('running POST...')
post_response = requests.post('http://localhost:4567/projects/1/categories',
    json=item)
print('POST response:')
parsed = json.loads(post_response.text)
print(json.dumps(parsed, indent=4, sort_keys=False))
print('Checking new item')
print('running GET...')
get_response = requests.get('http://localhost:4567/todos')
parsed = json.loads(get_response.text)
print('GET response:')
print(json.dumps(parsed, indent=4, sort_keys=False))

import requests
import json
print('running GET...')
get_response = requests.get('http://localhost:4567/projects/1/categories')
parsed = json.loads(get_response.text)
print('GET response:')
print(json.dumps(parsed, indent=4, sort_keys=False))
print('running HEAD...')
head_response = requests.head('http://localhost:4567/projects/1/categories')
print('HEAD response:')
print(head_response.headers)
item = {'id': 2}
print('running POST...')
post_response = requests.post('http://localhost:4567/projects/1/categories',
    json=item)
print('POST response:')
parsed = json.loads(post_response.text)
print(json.dumps(parsed, indent=4, sort_keys=False))
print('Checking new item')
print('running GET...')
get_response = requests.get('http://localhost:4567/todos')
parsed = json.loads(get_response.text)
print('GET response:')
print(json.dumps(parsed, indent=4, sort_keys=False))

import requests
import json

# GET todos
print("running GET...")
get_response = requests.get('http://localhost:4567/projects/1/categories')
parsed = json.loads(get_response.text)
print("GET response:")
print(json.dumps(parsed, indent=4, sort_keys=False))

# HEAD todos
print("running HEAD...")
head_response = requests.head('http://localhost:4567/projects/1/categories')
print("HEAD response:")
print(head_response.headers)

# POST todos
item = {
    'id': 2,
}

print("running POST...")
post_response = requests.post('http://localhost:4567/projects/1/categories', json = item)
print("POST response:")
parsed = json.loads(post_response.text)
print(json.dumps(parsed, indent=4, sort_keys=False))

# Check new item
print("Checking new item")
print("running GET...")
get_response = requests.get('http://localhost:4567/todos')
parsed = json.loads(get_response.text)
print("GET response:")
print(json.dumps(parsed, indent=4, sort_keys=False))