diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-16 15:07:58 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-16 15:07:58 -0700 |
commit | 13d5073e5b54b66235b3b8873017323ecbac81d5 (patch) | |
tree | 8c8c5722c1168140a43177944574e184b24ec900 /osdep/Http.hpp | |
parent | 8333bf065e917c0cff8baecc63e8e96dace6cac6 (diff) | |
download | infinitytier-13d5073e5b54b66235b3b8873017323ecbac81d5.tar.gz infinitytier-13d5073e5b54b66235b3b8873017323ecbac81d5.zip |
CLI work and Makefile cleanup.
Diffstat (limited to 'osdep/Http.hpp')
-rw-r--r-- | osdep/Http.hpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/osdep/Http.hpp b/osdep/Http.hpp index c73cc112..a1882add 100644 --- a/osdep/Http.hpp +++ b/osdep/Http.hpp @@ -83,6 +83,35 @@ public: } /** + * Make HTTP DELETE request + * + * The caller must set all headers, including Host. + * + * @return HTTP status code or 0 on error (responseBody will contain error message) + */ + static inline unsigned int DELETE( + unsigned long maxResponseSize, + unsigned long timeout, + const struct sockaddr *remoteAddress, + const char *path, + const std::map<std::string,std::string> &requestHeaders, + std::map<std::string,std::string> &responseHeaders, + std::string &responseBody) + { + return _do( + "DELETE", + maxResponseSize, + timeout, + remoteAddress, + path, + requestHeaders, + (const void *)0, + 0, + responseHeaders, + responseBody); + } + + /** * Make HTTP POST request * * It is the responsibility of the caller to set all headers. With POST, the |