summaryrefslogtreecommitdiff
path: root/src/mongo/util/net/httpclient.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/net/httpclient.h')
-rw-r--r--src/mongo/util/net/httpclient.h71
1 files changed, 35 insertions, 36 deletions
diff --git a/src/mongo/util/net/httpclient.h b/src/mongo/util/net/httpclient.h
index 18c66aee25c..8c7c1af8ce6 100644
--- a/src/mongo/util/net/httpclient.h
+++ b/src/mongo/util/net/httpclient.h
@@ -37,52 +37,51 @@
namespace mongo {
- class HttpClient {
- MONGO_DISALLOW_COPYING(HttpClient);
- public:
-
- typedef std::map<std::string,std::string> Headers;
+class HttpClient {
+ MONGO_DISALLOW_COPYING(HttpClient);
- class Result {
- public:
- Result() {}
+public:
+ typedef std::map<std::string, std::string> Headers;
- const std::string& getEntireResponse() const {
- return _entireResponse;
- }
+ class Result {
+ public:
+ Result() {}
- Headers getHeaders() const {
- return _headers;
- }
+ const std::string& getEntireResponse() const {
+ return _entireResponse;
+ }
- const std::string& getBody() const {
- return _body;
- }
+ Headers getHeaders() const {
+ return _headers;
+ }
- private:
+ const std::string& getBody() const {
+ return _body;
+ }
- void _init( int code , std::string entire );
+ private:
+ void _init(int code, std::string entire);
- int _code;
- std::string _entireResponse;
+ int _code;
+ std::string _entireResponse;
- Headers _headers;
- std::string _body;
+ Headers _headers;
+ std::string _body;
- friend class HttpClient;
- };
+ friend class HttpClient;
+ };
- /**
- * @return response code
- */
- int get( const std::string& url , Result * result = 0 );
+ /**
+ * @return response code
+ */
+ int get(const std::string& url, Result* result = 0);
- /**
- * @return response code
- */
- int post( const std::string& url , const std::string& body , Result * result = 0 );
+ /**
+ * @return response code
+ */
+ int post(const std::string& url, const std::string& body, Result* result = 0);
- private:
- int _go( const char * command , std::string url , const char * body , Result * result );
- };
+private:
+ int _go(const char* command, std::string url, const char* body, Result* result);
+};
}