http_client::add_handler 方法

添加 HTTP 管道阶段到客户端。

void add_handler(
   std::function<pplx::task<http_response>(http_request,
   std::shared_ptr<http::http_pipeline_stage>)> handler
);

void add_handler(
   std::shared_ptr<http::http_pipeline_stage> stage
);

参数

  • handler
    表示管道阶段的函数对象。

  • stage
    指向管道阶段的共享指针。

要求

**标头:**http_client.h

**命名空间:**web::http::client

请参见

参考

http_client 类