Virtru SDK for C++  2.8.0
Virtru C++ SDK library - Create, Read, and Manage TDF3 Files
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
virtru::INetwork Class Referenceabstract

#include <network_interface.h>

Public Member Functions

virtual ~INetwork ()=default
 
virtual void executeGet (const std::string &url, const HttpHeaders &headers, HTTPServiceCallback &&callback, const std::string &certAuth="", const std::string &clientKeyFileName="", const std::string &clientCertFileName="")=0
 
virtual void executePut (const std::string &url, const HttpHeaders &headers, std::string &&body, HTTPServiceCallback &&callback, const std::string &certAuth="", const std::string &clientKeyFileName="", const std::string &clientCertFileName="")=0
 
virtual void executePost (const std::string &url, const HttpHeaders &headers, std::string &&body, HTTPServiceCallback &&callback, const std::string &certAuth="", const std::string &clientKeyFileName="", const std::string &clientCertFileName="")=0
 
virtual void executePatch (const std::string &url, const HttpHeaders &headers, std::string &&body, HTTPServiceCallback &&callback, const std::string &certAuth="", const std::string &clientKeyFileName="", const std::string &clientCertFileName="")=0
 
virtual void executeHead (const std::string &url, const HttpHeaders &headers, HTTPServiceCallback &&callback, const std::string &certAuth="", const std::string &clientKeyFileName="", const std::string &clientCertFileName="")=0
 

Detailed Description

An interface for handling network request.

If the consumer wants to provide their own network interface, this interface needs to implemented.

Constructor & Destructor Documentation

virtual virtru::INetwork::~INetwork ( )
virtualdefault

Member Function Documentation

virtual void virtru::INetwork::executeGet ( const std::string &  url,
const HttpHeaders headers,
HTTPServiceCallback &&  callback,
const std::string &  certAuth = "",
const std::string &  clientKeyFileName = "",
const std::string &  clientCertFileName = "" 
)
pure virtual

Execute a get request and on completion the callback is executed.

Parameters
url- The url (e.g., "https://developer.virtru.com/docs/sdk").
headers- The http headers used by network service when performing HTTP operation.
callback- The response callback.
virtual void virtru::INetwork::executeHead ( const std::string &  url,
const HttpHeaders headers,
HTTPServiceCallback &&  callback,
const std::string &  certAuth = "",
const std::string &  clientKeyFileName = "",
const std::string &  clientCertFileName = "" 
)
pure virtual

Execute a head request and on completion the callback is executed.

Parameters
url- The url (e.g., "https://developer.virtru.com/docs/sdk").
headers- The http headers used by network service when performing HTTP operation.
callback- The response callback.
virtual void virtru::INetwork::executePatch ( const std::string &  url,
const HttpHeaders headers,
std::string &&  body,
HTTPServiceCallback &&  callback,
const std::string &  certAuth = "",
const std::string &  clientKeyFileName = "",
const std::string &  clientCertFileName = "" 
)
pure virtual

Execute a patch request and on completion the callback is executed.

Parameters
url- The url (e.g., "https://api.virtru.com/api/policies").
headers- The http headers used by network service when performing HTTP operation.
body- The HTTP body part of the request
callback- The response callback.
virtual void virtru::INetwork::executePost ( const std::string &  url,
const HttpHeaders headers,
std::string &&  body,
HTTPServiceCallback &&  callback,
const std::string &  certAuth = "",
const std::string &  clientKeyFileName = "",
const std::string &  clientCertFileName = "" 
)
pure virtual

Execute a post request and on completion the callback is executed.

Parameters
url- The url (e.g., "https://api.virtru.com/api/entityobject").
headers- The http headers used by network service when performing HTTP operation.
body- The HTTP body part of the request
callback- The response callback.
virtual void virtru::INetwork::executePut ( const std::string &  url,
const HttpHeaders headers,
std::string &&  body,
HTTPServiceCallback &&  callback,
const std::string &  certAuth = "",
const std::string &  clientKeyFileName = "",
const std::string &  clientCertFileName = "" 
)
pure virtual

Execute a put request and on completion the callback is executed.

Parameters
url- The url (e.g., "https://api.virtru.com/api/entityobject").
headers- The http headers used by network service when performing HTTP operation.
body- The HTTP body part of the request
callback- The response callback.

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