~nhanb/gae-proxy

31bc73d215131139276771f09854021eb89cba00 — Bùi Thành Nhân 2 years ago 81a6366
testing
1 files changed, 4 insertions(+), 3 deletions(-)

M send.py
M send.py => send.py +4 -3
@@ 6,14 6,13 @@ import requests
Lazy quick test script
"""

PASSWORD = os.environ.get("GAEPROXY_PASSWORD", "foo")
print(PASSWORD)
PASSWORD = os.environ["GAEPROXY_PASSWORD"]


resp = requests.post(
    "https://nhansproxy.df.r.appspot.com/proxy",
    json={
        "url": "https://httpbin.org/get",
        "url": "https://httpbin.org/ip",
        "method": "get",
        "body": None,
        "headers": {"Foo-Bar": "ehhhh"},


@@ 21,8 20,10 @@ resp = requests.post(
    },
)

"""
print(resp.status_code)
for hkey, hval in resp.headers.items():
    print(hkey, ":", hval)
"""

print(resp.text)