boy-hack / hack-requests

The hack-requests is an http network library for hackers
MIT License
466 stars 90 forks source link

为http() 增加了 params 参数,支持以 dict 形式传入query string #24

Closed 1nhann closed 2 years ago

1nhann commented 2 years ago

为http() 增加了 params 参数,支持以 dict 形式传入query string,用起来像 requests 一样

import HackRequests as hack
url = "http://127.0.0.1"
params = {"id":"1"}
resp = hack.http(url=url,params=params)
threadpool = hack.threadpool(threadnum=3,callback=callback)
params = {"id":"1"}
for i in range(10):
    threadpool.http(url=url,params=params)