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::Result Struct Reference

#include <restincurl.h>

Collaboration diagram for restincurl::Result:
Collaboration graph

Public Member Functions

 Result ()=default
 
 Result (const CURLcode &code)
 
bool isOk () const noexcept
 

Public Attributes

CURLcode curl_code = {}
 
long http_response_code = {}
 
std::string msg
 
std::string body
 

Detailed Description

The Result from a request\

Constructor & Destructor Documentation

◆ Result() [1/2]

restincurl::Result::Result ( )
default

◆ Result() [2/2]

restincurl::Result::Result ( const CURLcode & code)
inline

References curl_code, and msg.

Member Function Documentation

◆ isOk()

bool restincurl::Result::isOk ( ) const
inlinenoexcept

Check if the reqtest appears to be successful

References curl_code, and http_response_code.

Member Data Documentation

◆ body

std::string restincurl::Result::body

The body of the request returned by the server.

Note that if you specified your own body handler or body variable, for the request, body will be empty.

◆ curl_code

CURLcode restincurl::Result::curl_code = {}

The CURLcode returned by libcurl for this request.

CURLE_OK (or 0) indicates success.

Referenced by isOk(), and Result().

◆ http_response_code

long restincurl::Result::http_response_code = {}

The HTTP result code for the request

Referenced by isOk().

◆ msg

std::string restincurl::Result::msg

If the request was unsuccessful (curl_code != 0), the error string reported by libcurl.

Referenced by Result().


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