# ApiClient.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/web/client/ApiClient.hpp"

# ApiClient

ApiClient class provides convenient Retrofit-like interface over the oatpp::web::client::RequestExecutor.

namespace oatpp { namespace web { namespace client { 
  class ApiClient : public oatpp::base::Countable {}
}}}

# Typedefs

Type Name Summary
oatpp::web::protocol::http::Status Status Convenience typedef for oatpp::web::protocol::http::Status.
oatpp::web::protocol::http::Header Header Convenience typedef for oatpp::web::protocol::http::Header.
oatpp::String String Convenience typedef for oatpp::data::mapping::type::String.
oatpp::Int8 Int8 Convenience typedef for oatpp::data::mapping::type::Int8.
oatpp::UInt8 UInt8 Convenience typedef for oatpp::data::mapping::type::UInt8.
oatpp::Int16 Int16 Convenience typedef for oatpp::data::mapping::type::Int16.
oatpp::UInt16 UInt16 Convenience typedef for oatpp::data::mapping::type::UInt16.
oatpp::Int32 Int32 Convenience typedef for oatpp::data::mapping::type::Int32.
oatpp::UInt32 UInt32 Convenience typedef for oatpp::data::mapping::type::UInt32.
oatpp::Int64 Int64 Convenience typedef for oatpp::data::mapping::type::Int64.
oatpp::UInt64 UInt64 Convenience typedef for oatpp::data::mapping::type::UInt64.
oatpp::Float32 Float32 Convenience typedef for oatpp::data::mapping::type::Float32.
oatpp::Float64 Float64 Convenience typedef for atpp::data::mapping::type::Float64.
oatpp::Boolean Boolean Convenience typedef for oatpp::data::mapping::type::Boolean.
oatpp::web::protocol::http::incoming::Response Response Convenience typedef for oatpp::web::protocol::http::incoming::Response.
RequestExecutor::AsyncCallback AsyncCallback Convenience typedef for oatpp::web::client::RequestExecutor::AsyncCallback.

# Methods

Return Type Name Summary
std::shared_ptr<RequestExecutor::ConnectionHandle> getConnection Call oatpp::web::client::RequestExecutor::getConnection().
oatpp::async::CoroutineStarterForResult<const std::shared_ptr<RequestExecutor::ConnectionHandle>&> getConnectionAsync Call oatpp::web::client::RequestExecutor::getConnectionAsync().
void invalidateConnection Invalidate connection.

# ApiClient::Status

Convenience typedef for oatpp::web::protocol::http::Status.

typedef oatpp::web::protocol::http::Status Status

# ApiClient::Header

Convenience typedef for oatpp::web::protocol::http::Header.

typedef oatpp::web::protocol::http::Header Header

# ApiClient::String

Convenience typedef for oatpp::data::mapping::type::String.

typedef oatpp::String String

# ApiClient::Int8

Convenience typedef for oatpp::data::mapping::type::Int8.

typedef oatpp::Int8 Int8

# ApiClient::UInt8

Convenience typedef for oatpp::data::mapping::type::UInt8.

typedef oatpp::UInt8 UInt8

# ApiClient::Int16

Convenience typedef for oatpp::data::mapping::type::Int16.

typedef oatpp::Int16 Int16

# ApiClient::UInt16

Convenience typedef for oatpp::data::mapping::type::UInt16.

typedef oatpp::UInt16 UInt16

# ApiClient::Int32

Convenience typedef for oatpp::data::mapping::type::Int32.

typedef oatpp::Int32 Int32

# ApiClient::UInt32

Convenience typedef for oatpp::data::mapping::type::UInt32.

typedef oatpp::UInt32 UInt32

# ApiClient::Int64

Convenience typedef for oatpp::data::mapping::type::Int64.

typedef oatpp::Int64 Int64

# ApiClient::UInt64

Convenience typedef for oatpp::data::mapping::type::UInt64.

typedef oatpp::UInt64 UInt64

# ApiClient::Float32

Convenience typedef for oatpp::data::mapping::type::Float32.

typedef oatpp::Float32 Float32

# ApiClient::Float64

Convenience typedef for atpp::data::mapping::type::Float64.

typedef oatpp::Float64 Float64

# ApiClient::Boolean

Convenience typedef for oatpp::data::mapping::type::Boolean.

typedef oatpp::Boolean Boolean

# ApiClient::Response

Convenience typedef for oatpp::web::protocol::http::incoming::Response.

typedef oatpp::web::protocol::http::incoming::Response Response

# ApiClient::AsyncCallback

Convenience typedef for oatpp::web::client::RequestExecutor::AsyncCallback.

typedef RequestExecutor::AsyncCallback AsyncCallback

# ApiClient::getConnection

Call oatpp::web::client::RequestExecutor::getConnection().

virtual std::shared_ptr<RequestExecutor::ConnectionHandle> getConnection()

# ApiClient::getConnectionAsync

Call oatpp::web::client::RequestExecutor::getConnectionAsync().

  • @return - oatpp::async::CoroutineStarterForResult.

virtual oatpp::async::CoroutineStarterForResult<const std::shared_ptr<RequestExecutor::ConnectionHandle>&> getConnectionAsync()

# ApiClient::invalidateConnection

Invalidate connection.

  • @param connectionHandle

void invalidateConnection(const std::shared_ptr<RequestExecutor::ConnectionHandle>& connectionHandle)