Removed http::put and added a TODO. Review: https://reviews.apache.org/r/32349
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/91034cdd Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/91034cdd Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/91034cdd Branch: refs/heads/master Commit: 91034cddcd5158a0920352a00901952bfce93931 Parents: 103b6ea Author: Benjamin Mahler <[email protected]> Authored: Fri Mar 20 14:34:20 2015 -0700 Committer: Benjamin Mahler <[email protected]> Committed: Tue Mar 24 16:48:22 2015 -0700 ---------------------------------------------------------------------- 3rdparty/libprocess/include/process/http.hpp | 13 ++++--------- 3rdparty/libprocess/src/http.cpp | 14 -------------- 2 files changed, 4 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/91034cdd/3rdparty/libprocess/include/process/http.hpp ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/include/process/http.hpp b/3rdparty/libprocess/include/process/http.hpp index 616f380..faffae7 100644 --- a/3rdparty/libprocess/include/process/http.hpp +++ b/3rdparty/libprocess/include/process/http.hpp @@ -521,6 +521,10 @@ std::ostream& operator << ( const URL& url); +// TODO(bmahler): Consolidate these functions into a single +// http::request function that takes a 'Request' object. + + // Asynchronously sends an HTTP GET request to the specified URL // and returns the HTTP response of type 'BODY' once the entire // response is received. @@ -559,15 +563,6 @@ Future<Response> post( const Option<std::string>& body = None(), const Option<std::string>& contentType = None()); - -// Asynchronously sends an HTTP PUT request to the specified URL and -// returns the HTTP response. -Future<Response> put( - const URL& url, - const Option<hashmap<std::string, std::string>>& headers = None(), - const Option<std::string>& body = None(), - const Option<std::string>& contentType = None()); - } // namespace http { } // namespace process { http://git-wip-us.apache.org/repos/asf/mesos/blob/91034cdd/3rdparty/libprocess/src/http.cpp ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/src/http.cpp b/3rdparty/libprocess/src/http.cpp index 248db85..150ff33 100644 --- a/3rdparty/libprocess/src/http.cpp +++ b/3rdparty/libprocess/src/http.cpp @@ -746,19 +746,5 @@ Future<Response> post( return post(url, headers, body, contentType); } - -Future<Response> put( - const URL& url, - const Option<hashmap<string, string>>& headers, - const Option<string>& body, - const Option<string>& contentType) -{ - if (body.isNone() && contentType.isSome()) { - return Failure("Attempted to do a PUT with a Content-Type but no body"); - } - - return internal::request(url, "PUT", headers, body, contentType); -} - } // namespace http { } // namespace process {
