Last active
April 15, 2019 11:34
-
-
Save stephendarling/7185917dd076d319b0c36039b28b4a52 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| ... | |
| # Send REST request with Bearer OAuth2 token | |
| # run_service_url = The https endpoint created automatically by your new Cloud Run service | |
| # token = The response from the step above | |
| request = requests.get( | |
| url = run_service_url, | |
| headers = { | |
| 'Authorization': f'Bearer {token}' | |
| } | |
| ) | |
| results = { | |
| 'status_code': request.status_code, | |
| 'response': request.json() | |
| } | |
| print(json.dumps(results, indent=2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment