Skip to content
Snippets Groups Projects
post_cli_tool.py 358 B
Newer Older
  • Learn to ignore specific revisions
  • fcrisafulli-dev's avatar
    fcrisafulli-dev committed
    import requests
    
    # Specify the API URL we want to send our JSON to
    url = 'http://127.0.0.1:5000/webhook'
    # Specify the appropriate header for the POST request
    headers = {'Content-type': 'application/json'}
    # Specify the JSON data we want to send
    data = '{"title": "foo", "body": "bar", "userId": 1}'
    
    response = requests.post(url, headers=headers, data=data)