429 频率限制的情况,workerman如何提取状态码信息?

jackyxie

通过AsyncTcpConnection进行ws连接的时候,直接返回如下http频率限制信息。有没有哪些方法可以捕捉这信息进行相应的处理啊?

现在这种是直接输出,然后触发onclose,我想提取到429这种状态码。

Sec-WebSocket-Accept not found. Header:
HTTP/1.1 429 Too Many Requests
Date: Wed, 01 Sep 2021 01:01:16 GMT
Content-Type: application/json
Content-Length: 53
Connection: keep-alive
Set-Cookie: AWSALBTG=fBMYujX3PdIQL9ATt7YZnAudvylzgLX2SUdjoQgLSSmwQ0juK6VtC+PQ5px1IZ9E5kQAlcc/LTD+1NMeiJoU0DMC04LCjevjGGq3ntJA/IxBYHWFK7jeN5LXGOYZLn2f4lwd0/1YuM/Gf4Yout4+OwJeFeE2dijtMOe6aAkk0U8f; Expires=Wed, 08 Sep 2021 01:01:16 GMT; Path=/
Set-Cookie: AWSALBTGCORS=fBMYujX3PdIQL9ATt7YZnAudvylzgLX2SUdjoQgLSSmwQ0juK6VtC+PQ5px1IZ9E5kQAlcc/LTD+1NMeiJoU0DMC04LCjevjGGq3ntJA/IxBYHWFK7jeN5LXGOYZLn2f4lwd0/1YuM/Gf4Yout4+OwJeFeE2dijtMOe6aAkk0U8f; Expires=Wed, 08 Sep 2021 01:01:16 GMT; Path=/; SameSite=None; Secure
Strict-Transport-Security: max-age=31536000; includeSubDomains
2179 0 0
0个回答

年代过于久远,无法发表回答
×
🔝