libhv
libhv copied to clipboard
Feature requested: Websocket support open with params
The open function of WebSocketClient does not support param, could that be supported? I think the change is small.
change function definition from
int open(const char* url, const http_headers& headers = DefaultHeaders);
to
int open(const char* url,
const http_headers& headers = DefaultHeaders,
const QueryParams& params = QueryParams());
update implementation with one line, just set query_params before ParseUrl
+ http_req_->query_params = params;
http_req_->ParseUrl();
可以在open前通过setHttpRequest接口来设置http_req_的
明白。嗯,不过我是直接把param拼接到url,也是一样的。
明白。嗯,不过我是直接把param拼接到url,也是一样的。
是的,也是可以的