comparison OrthancCppClient/HttpClient.h @ 60:77aec9be0a51 orthanc-renaming

renaming of cppclient
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 16 Sep 2012 09:29:54 +0200
parents 4bc019d2f969
children aa6c8a942952
comparison
equal deleted inserted replaced
59:c996319e90bc 60:77aec9be0a51
1 /** 1 /**
2 * Palanthir - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012 Medical Physics Department, CHU of Liege, 3 * Copyright (C) 2012 Medical Physics Department, CHU of Liege,
4 * Belgium 4 * Belgium
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person 6 * Permission is hereby granted, free of charge, to any person
7 * obtaining a copy of this software and associated documentation 7 * obtaining a copy of this software and associated documentation
32 32
33 #include <string> 33 #include <string>
34 #include <boost/shared_ptr.hpp> 34 #include <boost/shared_ptr.hpp>
35 #include <json/json.h> 35 #include <json/json.h>
36 36
37 namespace Palanthir 37 namespace Orthanc
38 { 38 {
39 class HttpClient 39 class HttpClient
40 { 40 {
41 private: 41 private:
42 struct PImpl; 42 struct PImpl;
43 boost::shared_ptr<PImpl> pimpl_; 43 boost::shared_ptr<PImpl> pimpl_;
44 44
45 std::string url_; 45 std::string url_;
46 Palanthir_HttpMethod method_; 46 Orthanc_HttpMethod method_;
47 Palanthir_HttpStatus lastStatus_; 47 Orthanc_HttpStatus lastStatus_;
48 std::string postData_; 48 std::string postData_;
49 bool isVerbose_; 49 bool isVerbose_;
50 50
51 public: 51 public:
52 HttpClient(); 52 HttpClient();
66 const std::string& GetUrl() const 66 const std::string& GetUrl() const
67 { 67 {
68 return url_; 68 return url_;
69 } 69 }
70 70
71 void SetMethod(Palanthir_HttpMethod method) 71 void SetMethod(Orthanc_HttpMethod method)
72 { 72 {
73 method_ = method; 73 method_ = method;
74 } 74 }
75 75
76 Palanthir_HttpMethod GetMethod() const 76 Orthanc_HttpMethod GetMethod() const
77 { 77 {
78 return method_; 78 return method_;
79 } 79 }
80 80
81 std::string& AccessPostData() 81 std::string& AccessPostData()
97 97
98 bool Apply(std::string& answer); 98 bool Apply(std::string& answer);
99 99
100 bool Apply(Json::Value& answer); 100 bool Apply(Json::Value& answer);
101 101
102 Palanthir_HttpStatus GetLastStatus() const 102 Orthanc_HttpStatus GetLastStatus() const
103 { 103 {
104 return lastStatus_; 104 return lastStatus_;
105 } 105 }
106 106
107 const char* GetLastStatusText() const 107 const char* GetLastStatusText() const