Definition at line 78 of file includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
Public Member Functions | |
| void | DispatchEvent (opentelemetry::ext::http::client::SessionState type, const std::string &reason="") |
| HttpOperation (opentelemetry::ext::http::client::Method method, std::string url, const opentelemetry::ext::http::client::HttpSslOptions &ssl_options, opentelemetry::ext::http::client::EventHandler *event_handle, const opentelemetry::ext::http::client::Headers &request_headers=opentelemetry::ext::http::client::Headers(), const opentelemetry::ext::http::client::Body &request_body=opentelemetry::ext::http::client::Body(), const opentelemetry::ext::http::client::Compression &compression=opentelemetry::ext::http::client::Compression::kNone, bool is_raw_response=false, std::chrono::milliseconds http_conn_timeout=kDefaultHttpConnTimeout, bool reuse_connection=false, bool is_log_enabled=false, const opentelemetry::ext::http::client::RetryPolicy &retry_policy={}) | |
| Create local CURL instance for url and body. More... | |
| virtual | ~HttpOperation () |
| Destroy CURL instance. More... | |
| virtual void | Finish () |
| Finish CURL instance. More... | |
| void | Cleanup () |
| Cleanup all resource of curl. More... | |
| bool | IsRetryable () |
| Determine if operation is retryable. More... | |
| std::chrono::system_clock::time_point | NextRetryTime () |
| Calculate next time to retry request. More... | |
| CURLcode | Setup () |
| Setup request. More... | |
| CURLcode | Send () |
| Send request synchronously. More... | |
| CURLcode | SendAsync (Session *session, std::function< void(HttpOperation &)> callback=nullptr) |
| Send request asynchronously. More... | |
| void | SendSync () |
| StatusCode | GetResponseCode () const noexcept |
| Get HTTP response code. More... | |
| CURLcode | GetLastResultCode () |
| opentelemetry::ext::http::client::SessionState | GetSessionState () |
| Get last session state. More... | |
| bool | WasAborted () |
| Get whether or not response was programmatically aborted. More... | |
| Headers | GetResponseHeaders () |
| Return a copy of response headers. More... | |
| const std::vector< uint8_t > & | GetResponseBody () const noexcept |
| Return a copy of response body. More... | |
| const std::vector< uint8_t > & | GetRawResponse () const noexcept |
| Return a raw copy of response headers+body. More... | |
| void | ReleaseResponse () |
| Release memory allocated for response. More... | |
| void | Abort () |
| Abort request in connecting or reading state. More... | |
| void | PerformCurlMessage (CURLcode code) |
| Perform curl message, this function only can be called in the polling thread and it can only be called when got a CURLMSG_DONE. More... | |
| CURL * | GetCurlEasyHandle () noexcept |
| void | DispatchEvent (opentelemetry::ext::http::client::SessionState type, const std::string &reason="") |
| HttpOperation (opentelemetry::ext::http::client::Method method, std::string url, const opentelemetry::ext::http::client::HttpSslOptions &ssl_options, opentelemetry::ext::http::client::EventHandler *event_handle, const opentelemetry::ext::http::client::Headers &request_headers=opentelemetry::ext::http::client::Headers(), const opentelemetry::ext::http::client::Body &request_body=opentelemetry::ext::http::client::Body(), const opentelemetry::ext::http::client::Compression &compression=opentelemetry::ext::http::client::Compression::kNone, bool is_raw_response=false, std::chrono::milliseconds http_conn_timeout=kDefaultHttpConnTimeout, bool reuse_connection=false, bool is_log_enabled=false, const opentelemetry::ext::http::client::RetryPolicy &retry_policy={}) | |
| Create local CURL instance for url and body. More... | |
| virtual | ~HttpOperation () |
| Destroy CURL instance. More... | |
| virtual void | Finish () |
| Finish CURL instance. More... | |
| void | Cleanup () |
| Cleanup all resource of curl. More... | |
| bool | IsRetryable () |
| Determine if operation is retryable. More... | |
| std::chrono::system_clock::time_point | NextRetryTime () |
| Calculate next time to retry request. More... | |
| CURLcode | Setup () |
| Setup request. More... | |
| CURLcode | Send () |
| Send request synchronously. More... | |
| CURLcode | SendAsync (Session *session, std::function< void(HttpOperation &)> callback=nullptr) |
| Send request asynchronously. More... | |
| void | SendSync () |
| StatusCode | GetResponseCode () const noexcept |
| Get HTTP response code. More... | |
| CURLcode | GetLastResultCode () |
| opentelemetry::ext::http::client::SessionState | GetSessionState () |
| Get last session state. More... | |
| bool | WasAborted () |
| Get whether or not response was programmatically aborted. More... | |
| Headers | GetResponseHeaders () |
| Return a copy of response headers. More... | |
| const std::vector< uint8_t > & | GetResponseBody () const noexcept |
| Return a copy of response body. More... | |
| const std::vector< uint8_t > & | GetRawResponse () const noexcept |
| Return a raw copy of response headers+body. More... | |
| void | ReleaseResponse () |
| Release memory allocated for response. More... | |
| void | Abort () |
| Abort request in connecting or reading state. More... | |
| void | PerformCurlMessage (CURLcode code) |
| Perform curl message, this function only can be called in the polling thread and it can only be called when got a CURLMSG_DONE. More... | |
| CURL * | GetCurlEasyHandle () noexcept |
Friends | |
| class | HttpOperationAccessor |
| ext::http::client::curl::HttpOperation::HttpOperation | ( | opentelemetry::ext::http::client::Method | method, |
| std::string | url, | ||
| const opentelemetry::ext::http::client::HttpSslOptions & | ssl_options, | ||
| opentelemetry::ext::http::client::EventHandler * | event_handle, | ||
| const opentelemetry::ext::http::client::Headers & | request_headers = opentelemetry::ext::http::client::Headers(), |
||
| const opentelemetry::ext::http::client::Body & | request_body = opentelemetry::ext::http::client::Body(), |
||
| const opentelemetry::ext::http::client::Compression & | compression = opentelemetry::ext::http::client::Compression::kNone, |
||
| bool | is_raw_response = false, |
||
| std::chrono::milliseconds | http_conn_timeout = kDefaultHttpConnTimeout, |
||
| bool | reuse_connection = false, |
||
| bool | is_log_enabled = false, |
||
| const opentelemetry::ext::http::client::RetryPolicy & | retry_policy = {} |
||
| ) |
Create local CURL instance for url and body.
| method | HTTP Method |
| url | HTTP URL |
| request_headers | Request Headers |
| request_body | Request Body |
| is_raw_response | Whether to parse the response |
| http_conn_timeout | HTTP connection timeout in seconds |
| reuse_connection | Whether connection should be reused or closed |
| is_log_enabled | To intercept some information from cURL request |
| retry_policy | Retry policy for select failure status codes |
|
virtual |
Destroy CURL instance.
| ext::http::client::curl::HttpOperation::HttpOperation | ( | opentelemetry::ext::http::client::Method | method, |
| std::string | url, | ||
| const opentelemetry::ext::http::client::HttpSslOptions & | ssl_options, | ||
| opentelemetry::ext::http::client::EventHandler * | event_handle, | ||
| const opentelemetry::ext::http::client::Headers & | request_headers = opentelemetry::ext::http::client::Headers(), |
||
| const opentelemetry::ext::http::client::Body & | request_body = opentelemetry::ext::http::client::Body(), |
||
| const opentelemetry::ext::http::client::Compression & | compression = opentelemetry::ext::http::client::Compression::kNone, |
||
| bool | is_raw_response = false, |
||
| std::chrono::milliseconds | http_conn_timeout = kDefaultHttpConnTimeout, |
||
| bool | reuse_connection = false, |
||
| bool | is_log_enabled = false, |
||
| const opentelemetry::ext::http::client::RetryPolicy & | retry_policy = {} |
||
| ) |
Create local CURL instance for url and body.
| method | HTTP Method |
| url | HTTP URL |
| request_headers | Request Headers |
| request_body | Request Body |
| is_raw_response | Whether to parse the response |
| http_conn_timeout | HTTP connection timeout in seconds |
| reuse_connection | Whether connection should be reused or closed |
| is_log_enabled | To intercept some information from cURL request |
| retry_policy | Retry policy for select failure status codes |
|
virtual |
Destroy CURL instance.
| void ext::http::client::curl::HttpOperation::Abort | ( | ) |
Abort request in connecting or reading state.
| void ext::http::client::curl::HttpOperation::Abort | ( | ) |
Abort request in connecting or reading state.
| void ext::http::client::curl::HttpOperation::Cleanup | ( | ) |
Cleanup all resource of curl.
| void ext::http::client::curl::HttpOperation::Cleanup | ( | ) |
Cleanup all resource of curl.
| void ext::http::client::curl::HttpOperation::DispatchEvent | ( | opentelemetry::ext::http::client::SessionState | type, |
| const std::string & | reason = "" |
||
| ) |
| void ext::http::client::curl::HttpOperation::DispatchEvent | ( | opentelemetry::ext::http::client::SessionState | type, |
| const std::string & | reason = "" |
||
| ) |
|
virtual |
Finish CURL instance.
|
virtual |
Finish CURL instance.
|
inlinenoexcept |
Definition at line 266 of file includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
References ext::http::client::curl::HttpCurlEasyResource::easy_handle.
|
inlinenoexcept |
Definition at line 266 of file 9.2/includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
References ext::http::client::curl::HttpCurlEasyResource::easy_handle.
|
inline |
Definition at line 221 of file includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
|
inline |
Definition at line 221 of file 9.2/includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
|
inlinenoexcept |
Return a raw copy of response headers+body.
Definition at line 246 of file 9.2/includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
|
inlinenoexcept |
Return a raw copy of response headers+body.
Definition at line 246 of file includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
|
inlinenoexcept |
Return a copy of response body.
Definition at line 241 of file 9.2/includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
|
inlinenoexcept |
Return a copy of response body.
Definition at line 241 of file includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
Referenced by ext::http::client::curl::HttpClientSync::Get(), and ext::http::client::curl::HttpClientSync::Post().
|
inlinenoexcept |
Get HTTP response code.
This function returns 0.
Definition at line 216 of file includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
Referenced by ext::http::client::curl::HttpClientSync::Get(), and ext::http::client::curl::HttpClientSync::Post().
|
inlinenoexcept |
Get HTTP response code.
This function returns 0.
Definition at line 216 of file 9.2/includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
| Headers ext::http::client::curl::HttpOperation::GetResponseHeaders | ( | ) |
Return a copy of response headers.
| Headers ext::http::client::curl::HttpOperation::GetResponseHeaders | ( | ) |
Return a copy of response headers.
Referenced by ext::http::client::curl::HttpClientSync::Get(), and ext::http::client::curl::HttpClientSync::Post().
|
inline |
Get last session state.
Definition at line 226 of file 9.2/includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
|
inline |
Get last session state.
Definition at line 226 of file includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
Referenced by ext::http::client::curl::HttpClientSync::Get(), and ext::http::client::curl::HttpClientSync::Post().
| bool ext::http::client::curl::HttpOperation::IsRetryable | ( | ) |
Determine if operation is retryable.
| bool ext::http::client::curl::HttpOperation::IsRetryable | ( | ) |
Determine if operation is retryable.
| std::chrono::system_clock::time_point ext::http::client::curl::HttpOperation::NextRetryTime | ( | ) |
Calculate next time to retry request.
| std::chrono::system_clock::time_point ext::http::client::curl::HttpOperation::NextRetryTime | ( | ) |
Calculate next time to retry request.
| void ext::http::client::curl::HttpOperation::PerformCurlMessage | ( | CURLcode | code | ) |
Perform curl message, this function only can be called in the polling thread and it can only be called when got a CURLMSG_DONE.
| code | CURLcode |
| void ext::http::client::curl::HttpOperation::PerformCurlMessage | ( | CURLcode | code | ) |
Perform curl message, this function only can be called in the polling thread and it can only be called when got a CURLMSG_DONE.
| code | CURLcode |
| void ext::http::client::curl::HttpOperation::ReleaseResponse | ( | ) |
Release memory allocated for response.
| void ext::http::client::curl::HttpOperation::ReleaseResponse | ( | ) |
Release memory allocated for response.
| CURLcode ext::http::client::curl::HttpOperation::Send | ( | ) |
Send request synchronously.
| CURLcode ext::http::client::curl::HttpOperation::Send | ( | ) |
Send request synchronously.
Referenced by SendSync().
| CURLcode ext::http::client::curl::HttpOperation::SendAsync | ( | Session * | session, |
| std::function< void(HttpOperation &)> | callback = nullptr |
||
| ) |
Send request asynchronously.
| session | This operator must be binded to a Session |
| callback | callback when start async request success and got response |
| CURLcode ext::http::client::curl::HttpOperation::SendAsync | ( | Session * | session, |
| std::function< void(HttpOperation &)> | callback = nullptr |
||
| ) |
Send request asynchronously.
| session | This operator must be binded to a Session |
| callback | callback when start async request success and got response |
|
inline |
Definition at line 211 of file 9.2/includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
References Send().
|
inline |
Definition at line 211 of file includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
References Send().
Referenced by ext::http::client::curl::HttpClientSync::Get(), and ext::http::client::curl::HttpClientSync::Post().
| CURLcode ext::http::client::curl::HttpOperation::Setup | ( | ) |
Setup request.
| CURLcode ext::http::client::curl::HttpOperation::Setup | ( | ) |
Setup request.
|
inline |
Get whether or not response was programmatically aborted.
Definition at line 231 of file 9.2/includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
|
inline |
Get whether or not response was programmatically aborted.
Definition at line 231 of file includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.
Referenced by ext::http::client::curl::HttpClientSync::Get(), and ext::http::client::curl::HttpClientSync::Post().
|
friend |
Definition at line 341 of file includes/opentelemetry/ext/http/client/curl/http_operation_curl.h.