/include/nebu/nebuClient.h

https://github.com/deltaforge/nebu-common-cpp · C Header · 42 lines · 27 code · 12 blank · 3 comment · 0 complexity · 4f0ddeed3e3754a8a157387a2ef26cc3 MD5 · raw file

  1. #ifndef NEBU_NEBUCLIENT_H_
  2. #define NEBU_NEBUCLIENT_H_
  3. #include "nebu/restClientAdapter.h"
  4. #include <memory>
  5. #include <string>
  6. namespace nebu
  7. {
  8. namespace common
  9. {
  10. class NebuClient
  11. {
  12. public:
  13. struct Response
  14. {
  15. int status_code;
  16. std::string body;
  17. };
  18. NebuClient(std::shared_ptr<RestClientAdapter> restClient, const std::string &baseURI);
  19. virtual ~NebuClient() { }
  20. // NOT IMPLEMENTED:
  21. //NebuClient(shared_ptr<RestClientAdapter> restClient, const std::string &baseURI,
  22. // const std::string &username, const std::string &password);
  23. virtual Response performGET(const std::string &URI) const;
  24. private:
  25. std::shared_ptr<RestClientAdapter> restClient;
  26. std::string baseURI;
  27. };
  28. }
  29. }
  30. #endif