Skip to content

Instantly share code, notes, and snippets.

Created May 25, 2016 01:52
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
#ifndef CAPI_H
#define CAPI_H
#include <iostream>
#include <string>
#include <stdio.h>
#include <curl/curl.h>
class capi {
capi(std::string base_url);
/* REST API Calls */
std::string get(std::string end_point);
std::string post(std::string end_point);
std::string patch(std::string end_point, std::string data);
/* Get/Set */
void set_base_url(std::string base_url);
std::string get_base_url();
void set_auth_token(std::string token);
std::string get_auth_token();
void set_obj_id(std::string id);
std::string get_obj_id();
std::string root_url;
std::string auth_token;
std::string obj_id;
#endif // CAPI_H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment