----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/43217/#review117934 -----------------------------------------------------------
3rdparty/libprocess/src/help.cpp (lines 187 - 188) <https://reviews.apache.org/r/43217/#comment179232> You should be able to use the (Option<T>, T) equality operator to just do the following: ``` if (request.url.query.get("format") == "json") { ``` Although we probably have to do the following because of the string literal: ``` if (request.url.query.get("format") == Some("json")) { ``` 3rdparty/libprocess/src/help.cpp (lines 189 - 191) <https://reviews.apache.org/r/43217/#comment179234> This should be setting the content type already: ``` return http::OK(jsonify(*this)); ``` - Ben Mahler On Feb. 4, 2016, 8:39 p.m., Kevin Klues wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/43217/ > ----------------------------------------------------------- > > (Updated Feb. 4, 2016, 8:39 p.m.) > > > Review request for mesos, Ben Mahler, Greg Mann, and Neil Conway. > > > Bugs: MESOS-3831 > https://issues.apache.org/jira/browse/MESOS-3831 > > > Repository: mesos > > > Description > ------- > > Previously, the /help endpoint could only be returned as either pure > markdown or html. > > This commit introduces a query parameter: format=json to allow the > help endpoint to return a JSON object containing the help information > for all other endpoints. > > > Diffs > ----- > > 3rdparty/libprocess/src/help.cpp 2f718b9e160113518fb4a0260db916cb2242dbae > > Diff: https://reviews.apache.org/r/43217/diff/ > > > Testing > ------- > > > Thanks, > > Kevin Klues > >
