mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
simplify httpbin stuff
This commit is contained in:
@@ -21,12 +21,10 @@ from requests import HTTPError
|
||||
from requests import get, post, head, put
|
||||
from requests.auth import HTTPBasicAuth, HTTPDigestAuth
|
||||
|
||||
if (sys.platform == 'win32') and ('HTTPBIN_URL' not in os.environ):
|
||||
if 'HTTPBIN_URL' not in os.environ:
|
||||
os.environ['HTTPBIN_URL'] = 'http://httpbin.org/'
|
||||
|
||||
# TODO: Detect an open port.
|
||||
PORT = os.environ.get('HTTPBIN_PORT', '7077')
|
||||
HTTPBIN_URL = os.environ.get('HTTPBIN_URL', 'http://0.0.0.0:%s/' % (PORT))
|
||||
HTTPBIN_URL = os.environ.get('HTTPBIN_URL')
|
||||
|
||||
|
||||
def httpbin(*suffix):
|
||||
|
||||
Reference in New Issue
Block a user