> On Jan. 11, 2016, 8:12 a.m., Adam B wrote: > > Why not add an overload for `put()`? It could call into the more generic > > `request()`, like you want to do with post/get
For enhancing the libprocess/http to send put request besides get and post requests, there already has a JIRA for this, refer https://issues.apache.org/jira/browse/MESOS-3763 for details. But in that JIRA, @BenJamin Mahler and @Anand Mazumdar are all suggest to expose internal::http::request as a general function in the header and not add an additional method/overload for put function, I think it is make sence. Because dynamic weights test need this fix urgently, so I post this patch to expose internal::http::request. > On Jan. 11, 2016, 8:12 a.m., Adam B wrote: > > 3rdparty/libprocess/src/http.cpp, line 1250 > > <https://reviews.apache.org/r/41789/diff/11/?file=1189249#file1189249line1250> > > > > Why not continue to call it 'request'? `http::httpRequest()` seems > > redundant. 'request' is a key word (the Request variable name) in the post()/get() method, for reducing the code modification, so I rename it to httpRequest. Can we change it back to 'reqeust' in the JIRA to clear get() and post() method? > On Jan. 11, 2016, 8:12 a.m., Adam B wrote: > > 3rdparty/libprocess/src/http.cpp, lines 1218-1221 > > <https://reviews.apache.org/r/41789/diff/11/?file=1189249#file1189249line1218> > > > > Will you add `query` as a parameter only once you've moved `get()` over > > to this? > > > > Does anybody even set the `contentType` yet? Yes, I planed to add query parametner once moved get() method. I will log another JIRA to clear the get() and post() method. And I only found contentType is set in master_maintenance_tests.cpp: // Initialize the default POST header. headers["Content-Type"] = "application/json"; - Yongqiao ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/41789/#review113694 ----------------------------------------------------------- On Jan. 9, 2016, 11:37 a.m., Yongqiao Wang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/41789/ > ----------------------------------------------------------- > > (Updated Jan. 9, 2016, 11:37 a.m.) > > > Review request for mesos, Adam B, Joerg Schad, Joris Van Remoortere, Neil > Conway, and Qian Zhang. > > > Bugs: MESOS-4200 > https://issues.apache.org/jira/browse/MESOS-4200 > > > Repository: mesos > > > Description > ------- > > Expose the internal::http::request function in the header and not add an > additional method/overload for put function. > > (TODO): Clean the other instances of post/get to use the http::request method. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/http.hpp > ed708fe4b0006782a19f9c61603f152e32a02e8e > 3rdparty/libprocess/src/http.cpp 06231d96c6c99cada0cd46d6ef1e3f64039215c2 > > Diff: https://reviews.apache.org/r/41789/diff/ > > > Testing > ------- > > Make & Make check successfully. > > > Thanks, > > Yongqiao Wang > >
