Skip to content

Instantly share code, notes, and snippets.

@afaqk9394
Created November 3, 2019 06:32
Show Gist options
  • Select an option

  • Save afaqk9394/05c58aa3efc81472cb44c301492c6a9f to your computer and use it in GitHub Desktop.

Select an option

Save afaqk9394/05c58aa3efc81472cb44c301492c6a9f to your computer and use it in GitHub Desktop.
verify that the resource (user) was indeed deleted by issuing an HTTP GET
import requests
import json
token = 'z8-sXMth942nOiQqXuikCNjbamrAlI2IjS7g'
url = 'https://gorest.co.in/public-api/users/1571'
result = requests.get(url,
headers={'Content-Type':'application/json',
'Authorization': 'Bearer {}'.format(token)})
print('Code: ', result.status_code)
print('Content: ', result.content.decode()[:500] + '...')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment