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

#include <restincurl.h>

Collaboration diagram for restincurl::Result:
Collaboration graph

Public Member Functions

 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\

Definition at line 241 of file restincurl.h.

Constructor & Destructor Documentation

◆ Result()

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

Definition at line 243 of file restincurl.h.

Member Function Documentation

◆ isOk()

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

Check if the reqtest appears to be successful

Definition at line 249 of file restincurl.h.

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.

Definition at line 275 of file restincurl.h.

◆ curl_code

CURLcode restincurl::Result::curl_code = {}

The CURLcode returned by libcurl for this request.

CURLE_OK (or 0) indicates success.

Definition at line 263 of file restincurl.h.

Referenced by isOk().

◆ http_response_code

long restincurl::Result::http_response_code = {}

The HTTP result code for the request

Definition at line 266 of file restincurl.h.

Referenced by isOk().

◆ msg

std::string restincurl::Result::msg

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

Definition at line 269 of file restincurl.h.


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