Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis Developer Reference
restincurl::OutDataHandler< T > Struct Template Reference

#include <restincurl.h>

Inheritance diagram for restincurl::OutDataHandler< T >:
Inheritance graph
Collaboration diagram for restincurl::OutDataHandler< T >:
Collaboration graph

Public Member Functions

 OutDataHandler ()=default
 
 OutDataHandler (const T &v)
 
 OutDataHandler (T &&v)
 

Static Public Member Functions

static size_t read_callback (char *bufptr, size_t size, size_t nitems, void *userdata)
 

Public Attributes

data_
 
size_t sendt_bytes_ = 0
 

Detailed Description

template<typename T>
struct restincurl::OutDataHandler< T >

Template implementation for output data to curl during a request.

This handler deals with the data sent to the HTTP server during a request (POST, PATCH etc). This implementation will typically use T=std::string and just store the data in a string. For json/XML payloads that's probably all you need. But if you send binary data, you may want to use a container like std::vector or std::deque in stead.

Constructor & Destructor Documentation

◆ OutDataHandler() [1/3]

template<typename T>
restincurl::OutDataHandler< T >::OutDataHandler ( )
default

Referenced by read_callback().

◆ OutDataHandler() [2/3]

template<typename T>
restincurl::OutDataHandler< T >::OutDataHandler ( const T & v)
inline

References data_.

◆ OutDataHandler() [3/3]

template<typename T>
restincurl::OutDataHandler< T >::OutDataHandler ( T && v)
inline

References data_.

Member Function Documentation

◆ read_callback()

template<typename T>
static size_t restincurl::OutDataHandler< T >::read_callback ( char * bufptr,
size_t size,
size_t nitems,
void * userdata )
inlinestatic

Member Data Documentation

◆ data_

template<typename T>
T restincurl::OutDataHandler< T >::data_

◆ sendt_bytes_

template<typename T>
size_t restincurl::OutDataHandler< T >::sendt_bytes_ = 0

Referenced by read_callback().


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