Created
December 25, 2015 05:59
-
-
Save xiantail/cd987d35bb08b3bab8fc to your computer and use it in GitHub Desktop.
Introducing Python / Chapter 9 Bottle
This file contains 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 | |
resp = requests.get('http://localhost:9999/echo/Mothra') | |
if resp.status_code == 200 and \ | |
resp.text == 'Say hello to my little friend: Mothra': | |
print('It worked! That almost never happens!') | |
else: | |
print('Argh, got this:', resp.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment