Closed shrimpwtf closed 3 months ago
Really simple fix to be able to add just a key into a order map, for dynamically computed headers such as 'Host' and still retain their order.
你应该用Set("host","test.com") 这个方法
Sometimes I have dynamic code where the host header is not known at runtime, it's easier to just have the code automatically handle it rather than having to parse a URL. I made a PR to help do this.
With content-length too for example, your code has a lot of dynamic types etc, can't simply just add the key to respect the proper header ordering and can't compute the length if you're just feeding in a struct and letting the software handle it. From a Quality of Life standpoint this is really needed.
With content-length too for example, your code has a lot of dynamic types etc, can't simply just add the key to respect the proper header ordering and can't compute the length if you're just feeding in a struct and letting the software handle it. From a Quality of Life standpoint this is really needed.
我明白了,如果合并你的代码在orderMap 中添加的话会有bug, 我会新增 orderHeaders 参数 来设置请求头顺序
Thankyou :)
Really simple fix to be able to add just a key into a order map, for dynamically computed headers such as 'Host' and still retain their order.