Mercurial > hg > orthanc
comparison OrthancCppClient/HttpClient.h @ 473:c9a5d72f8481
changing the namespace of HTTP enumerations
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 15 Jul 2013 17:22:13 +0200 |
parents | a6fe16a31615 |
children | a9693dc7089c |
comparison
equal
deleted
inserted
replaced
472:722b56b99093 | 473:c9a5d72f8481 |
---|---|
25 **/ | 25 **/ |
26 | 26 |
27 | 27 |
28 #pragma once | 28 #pragma once |
29 | 29 |
30 #include "HttpEnumerations.h" | |
31 #include "HttpException.h" | 30 #include "HttpException.h" |
32 | 31 |
33 #include <string> | 32 #include <string> |
34 #include <boost/shared_ptr.hpp> | 33 #include <boost/shared_ptr.hpp> |
35 #include <json/json.h> | 34 #include <json/json.h> |
42 struct PImpl; | 41 struct PImpl; |
43 boost::shared_ptr<PImpl> pimpl_; | 42 boost::shared_ptr<PImpl> pimpl_; |
44 | 43 |
45 std::string url_; | 44 std::string url_; |
46 std::string credentials_; | 45 std::string credentials_; |
47 Orthanc_HttpMethod method_; | 46 HttpMethod method_; |
48 Orthanc_HttpStatus lastStatus_; | 47 HttpStatus lastStatus_; |
49 std::string postData_; | 48 std::string postData_; |
50 bool isVerbose_; | 49 bool isVerbose_; |
51 | 50 |
52 void Setup(); | 51 void Setup(); |
53 | 52 |
73 const std::string& GetUrl() const | 72 const std::string& GetUrl() const |
74 { | 73 { |
75 return url_; | 74 return url_; |
76 } | 75 } |
77 | 76 |
78 void SetMethod(Orthanc_HttpMethod method) | 77 void SetMethod(HttpMethod method) |
79 { | 78 { |
80 method_ = method; | 79 method_ = method; |
81 } | 80 } |
82 | 81 |
83 Orthanc_HttpMethod GetMethod() const | 82 HttpMethod GetMethod() const |
84 { | 83 { |
85 return method_; | 84 return method_; |
86 } | 85 } |
87 | 86 |
88 std::string& AccessPostData() | 87 std::string& AccessPostData() |
104 | 103 |
105 bool Apply(std::string& answer); | 104 bool Apply(std::string& answer); |
106 | 105 |
107 bool Apply(Json::Value& answer); | 106 bool Apply(Json::Value& answer); |
108 | 107 |
109 Orthanc_HttpStatus GetLastStatus() const | 108 HttpStatus GetLastStatus() const |
110 { | 109 { |
111 return lastStatus_; | 110 return lastStatus_; |
112 } | 111 } |
113 | 112 |
114 const char* GetLastStatusText() const | 113 const char* GetLastStatusText() const |