userver: clients::http::Plugin Class Reference
Loading...
Searching...
No Matches
clients::http::Plugin Class Referenceabstract

#include <userver/clients/http/plugin.hpp>

Detailed Description

Base class for HTTP Client plugins.

Definition at line 36 of file plugin.hpp.

Public Member Functions

 Plugin (std::string name)
 
const std::string & GetName () const
 Get plugin name.
 
virtual void HookPerformRequest (PluginRequest &request)=0
 The hook is called before actual HTTP request sending and before DNS name resolution. You might want to use the hook for most of the hook job.
 
virtual void HookCreateSpan (PluginRequest &request)=0
 The hook is called just after the "external" Span is created. You might want to add custom tags from the hook.
 
virtual void HookOnCompleted (PluginRequest &request, Response &response)=0
 The hook is called after the HTTP response is received or the timeout is passed.
 

Member Function Documentation

◆ HookOnCompleted()

virtual void clients::http::Plugin::HookOnCompleted ( PluginRequest & request,
Response & response )
pure virtual

The hook is called after the HTTP response is received or the timeout is passed.

Warning
The hook is called in libev thread, not in coroutine context! Do not do any heavy work here, offload it to other hooks.

The documentation for this class was generated from the following file: