testHttpbin.py 189 B

12345678
  1. # coding:utf-8
  2. import json
  3. import requests
  4. import config
  5. r = requests.get(url=config.TEST_IP, headers=config.HEADER, timeout=config.TIMEOUT)
  6. json = json.loads(r.text)
  7. print json['origin']