共用方式為


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 類別