We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/** * get RPC header for debug */ func (client *Client) GetRpcHeaders() (_result map[string]*string, _err error) { headers := client.Headers client.Headers = nil _result = headers return _result, _err }
The text was updated successfully, but these errors were encountered:
设计上是这样子的,SetRpcHeaders和GetRpcHeaders是一次性的,也就是SetRpcHeaders后,仅在当前 request 中生效,下次 request 已清空。
如果您需要设置全局 headers,可以使用Config.GlobalParameters.Headers配置; 或者想要更好地 request 级别 headers 的隔离体验,可以使用util.RuntimeOptions.ExtendsParameters.Headers配置。
Sorry, something went wrong.
我们将SetRpcHeaders方法和GetRpcHeaders方法置为Deprecated
你好, 我不是要用这个方法,我是想实例化一个client *alidns.Client,然后其它请求都用这个client, 应该会并发用这个client。
DoRPCRequest 会调用 GetRpcHeaders, 然后代码看逻辑来讲 可能会出现数据竞争,虽然这里 client.Headers 应该都是nil
No branches or pull requests
The text was updated successfully, but these errors were encountered: