Skip to content

Instantly share code, notes, and snippets.

@Trafitto
Created September 24, 2019 17:28
Show Gist options
  • Save Trafitto/1a19d19e6041f9cec9943ad1b06cf4b7 to your computer and use it in GitHub Desktop.
Save Trafitto/1a19d19e6041f9cec9943ad1b06cf4b7 to your computer and use it in GitHub Desktop.

Revisions

  1. Trafitto created this gist Sep 24, 2019.
    11 changes: 11 additions & 0 deletions example_add_bestemmie.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    import requests

    BASE_URL = "http://bestemmie.org/api/{endpoint}"
    params = {
    "bestemmia": "Dio cane"
    }
    response = requests.post(BASE_URL.format(endpoint="bestemmie/"), params)
    response.raise_for_status()
    '''
    Return 204 no content
    '''