~nhanb/gae-proxy

ref: b809beb0305e20271517719e380a7d4127c4f437 gae-proxy/send.py -rw-r--r-- 380 bytes
b809beb0Bùi Thành Nhân minimum validation 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import requests

"""
Lazy quick test script
"""

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

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

print(resp.text)