wangluozhe / requests-go

go版requests的python版本,支持tls,http2,ja3指纹自定义
MIT License
179 stars 47 forks source link

TypeError: Object of type bytes is not JSON serializable #6

Closed gospider007 closed 1 year ago

gospider007 commented 1 year ago
import requests_go
url = "https://httpbin.org/post"
headers = {
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
}
tls = requests_go.tls_config.TLSConfig()
tls.pseudo_header_order = [
":method",
":authority",
":scheme",
":path"
]
tls.ja3 = "771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,16-18-5-27-0-13-11-43-45-35-51-23-10-65281-17513-21,29-23-24,0"
session=requests_go.Session()
response = session.post(url=url, headers=headers, tls_config=tls,json={
    "aa":1,
    "bb":"2"
})
print(response.text)
wangluozhe commented 1 year ago

这也是一个bug,感谢你的贡献。