userver: clients::http Namespace Reference
Loading...
Searching...
No Matches
clients::http Namespace Reference

Detailed Description

HTTP client helpers.

Classes

class  AuthFailedException
 
class  BadArgumentException
 
class  BaseCodeException
 Exception with string and error_code. More...
 
class  BaseException
 Exception with string. More...
 
class  CancelException
 
class  Client
 HTTP client that returns a HTTP request builder from CreateRequest(). More...
 
struct  ClientSettings
 
class  ConnectTo
 CURLOPT_CONNECT_TO argument for curl's connect_to(). More...
 
struct  DeadlinePropagationConfig
 
class  DNSProblemException
 
class  Form
 
class  HttpClientException
 
class  HttpException
 Base class for HttpClientException and HttpServerException. More...
 
class  HttpServerException
 
struct  LocalStats
 Represents all the local timings and statistics. More...
 
class  NetworkProblemException
 
class  Plugin
 Base class for HTTP Client plugins. More...
 
class  PluginRequest
 Auxiliary entity that allows editing request to a client from plugins. More...
 
class  Request
 Class for creating and performing new http requests. More...
 
class  Response
 Class that will be returned for successful request. More...
 
class  ResponseFuture
 Allows to perform a request concurrently with other work without creating an extra coroutine for waiting. More...
 
class  SSLException
 
class  StreamedResponse
 HTTP response for streamed API. More...
 
class  TechnicalError
 
class  TimeoutException
 
class  TooManyRedirectsException
 

Typedefs

using Status = ::http::StatusCode
 
using Headers = ::http::headers::HeaderMap
 Headers container type.
 

Enumerations

enum class  CancellationPolicy {
  kIgnore ,
  kCancel
}
 
enum class  HttpMethod {
  kGet ,
  kPost ,
  kHead ,
  kPut ,
  kDelete ,
  kPatch ,
  kOptions
}
 HTTP request method. More...
 
enum class  HttpAuthType {
  kBasic ,
  kDigest ,
  kDigestIE ,
  kNegotiate ,
  kNtlm ,
  kNtlmWb ,
  kAny ,
  kAnySafe
}
 
enum class  ProxyAuthType {
  kBasic ,
  kDigest ,
  kDigestIE ,
  kBearer ,
  kNegotiate ,
  kNtlm ,
  kNtlmWb ,
  kAny ,
  kAnySafe
}
 
enum class  ErrorKind {
  kNetwork ,
  kDeadlinePropagation ,
  kTimeout ,
  kCancel ,
  kClient ,
  kServer
}
 Additional tag to the exception. More...
 

Functions

CancellationPolicy Parse (yaml_config::YamlConfig value, formats::parse::To< CancellationPolicy >)
 
ClientSettings Parse (const yaml_config::YamlConfig &value, formats::parse::To< ClientSettings >)
 
std::string_view ToStringView (HttpMethod method)
 
ProxyAuthType ProxyAuthTypeFromString (const std::string &auth_name)
 
std::exception_ptr PrepareException (std::error_code ec, std::string_view url, const LocalStats &stats)
 map error_code to exceptions
 

Typedef Documentation

◆ Headers

Headers container type.

Definition at line 22 of file response.hpp.

◆ Status

Definition at line 19 of file response.hpp.

Enumeration Type Documentation

◆ CancellationPolicy

enum class clients::http::CancellationPolicy
strong

Definition at line 22 of file config.hpp.

◆ ErrorKind

enum class clients::http::ErrorKind
strong

Additional tag to the exception.

Definition at line 11 of file error_kind.hpp.

◆ HttpAuthType

enum class clients::http::HttpAuthType
strong
Enumerator
kBasic 

"basic"

kDigest 

"digest"

kDigestIE 

"digest_ie"

kNegotiate 

"negotiate"

kNtlm 

"ntlm"

kNtlmWb 

"ntlm_wb"

kAny 

"any"

kAnySafe 

"any_safe"

Definition at line 50 of file request.hpp.

◆ HttpMethod

enum class clients::http::HttpMethod
strong

HTTP request method.

Definition at line 44 of file request.hpp.

◆ ProxyAuthType

enum class clients::http::ProxyAuthType
strong
Enumerator
kBasic 

"basic"

kDigest 

"digest"

kDigestIE 

"digest_ie"

kBearer 

"bearer"

kNegotiate 

"negotiate"

kNtlm 

"ntlm"

kNtlmWb 

"ntlm_wb"

kAny 

"any"

kAnySafe 

"any_safe"

Definition at line 61 of file request.hpp.