You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Charlie Carson <cc...@twitter.com> on 2014/01/16 01:29:20 UTC

Re: Review Request 16839: Add process::http::post function to libprocess

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16839/
-----------------------------------------------------------

(Updated Jan. 16, 2014, 12:29 a.m.)


Review request for mesos, Benjamin Hindman, Ben Mahler, Jeff Currier, and Jie Yu.


Changes
-------

    CR feedback fixes.

    Change get's query argument to be Option<string>.
    Add a get w/ no default arguments for backcompat.
    Change post to take contentType and require path and body.
    Whitespace / formatting changes.


Summary (updated)
-----------------

Add process::http::post function to libprocess


Bugs: https://issues.apache.org/jira/browse/MESOS-902
    https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/MESOS-902


Repository: mesos-git


Description
-------

   Add post function to http.hpp of libprocess.

    This adds the post equivalent of the get function to http.hpp.

    The existing get method is refactored into internal::httpRequest
    with arguments for method, query, and body.

    The get and post functions can then be implemented as simple
    wrapper of internal::httpRequest.

    There are also new unit tests to verify the existing behavior of
    get and the new post behavior.

    See:  https://issues.apache.org/jira/browse/MESOS-902

    Review: https://reviews.apache.org/r/16839


Diffs (updated)
-----

  3rdparty/libprocess/include/process/http.hpp 5bdd520c9e0bcc0a2d3a4554cc4ced99dcf78b51 
  3rdparty/libprocess/src/process.cpp 67f7f9b3b05c8bc9b0f6281689223996ddfa68d1 
  3rdparty/libprocess/src/tests/http_tests.cpp 68d1a1b2ed5645d861b1e613aed9731368ebdc6a 

Diff: https://reviews.apache.org/r/16839/diff/


Testing
-------

added new unit tests
make check


Thanks,

Charlie Carson


Re: Review Request 16839: Add post function to http.hpp of libprocess.

Posted by Charlie Carson <cc...@twitter.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16839/
-----------------------------------------------------------

(Updated Jan. 16, 2014, 6:54 p.m.)


Review request for mesos, Benjamin Hindman, Ben Mahler, Jeff Currier, and Jie Yu.


Bugs: https://issues.apache.org/jira/browse/MESOS-902
    https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/MESOS-902


Repository: mesos-git


Description (updated)
-------

    Add post function to http.hpp of libprocess.

    This adds the post equivalent of the get function to http.hpp.

    The existing get method is refactored into internal::request
    with arguments for method, path, query, contentType, and body.

    The get and post functions can then be implemented as simple
    wrappers of internal::request.

    The new post function has all required arguments of path,
    contentType, and body.

    The get function's query argument is also changed to be
    Option<string> to better indicate that it is optional.

    That change requires adding a forwarding overload with the
    old signature (but w/o the default parameter value) for back-compat.

    There are also new unit tests to verify the existing behavior of
    get and the new post behavior.

    See:  https://issues.apache.org/jira/browse/MESOS-902

    Review: https://reviews.apache.org/r/16839


Diffs
-----

  3rdparty/libprocess/include/process/http.hpp 5bdd520c9e0bcc0a2d3a4554cc4ced99dcf78b51 
  3rdparty/libprocess/src/process.cpp 67f7f9b3b05c8bc9b0f6281689223996ddfa68d1 
  3rdparty/libprocess/src/tests/http_tests.cpp 68d1a1b2ed5645d861b1e613aed9731368ebdc6a 

Diff: https://reviews.apache.org/r/16839/diff/


Testing
-------

added new unit tests
make check


Thanks,

Charlie Carson


Re: Review Request 16839: Add post function to http.hpp of libprocess.

Posted by Charlie Carson <cc...@twitter.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16839/
-----------------------------------------------------------

(Updated Jan. 16, 2014, 6:53 p.m.)


Review request for mesos, Benjamin Hindman, Ben Mahler, Jeff Currier, and Jie Yu.


Changes
-------

flipped the order of the get's in process.cpp to match http.hpp
added a couple of comments to the back-compat get


Summary (updated)
-----------------

Add post function to http.hpp of libprocess.


Bugs: https://issues.apache.org/jira/browse/MESOS-902
    https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/MESOS-902


Repository: mesos-git


Description
-------

   Add post function to http.hpp of libprocess.

    This adds the post equivalent of the get function to http.hpp.

    The existing get method is refactored into internal::httpRequest
    with arguments for method, query, and body.

    The get and post functions can then be implemented as simple
    wrapper of internal::httpRequest.

    There are also new unit tests to verify the existing behavior of
    get and the new post behavior.

    See:  https://issues.apache.org/jira/browse/MESOS-902

    Review: https://reviews.apache.org/r/16839


Diffs (updated)
-----

  3rdparty/libprocess/include/process/http.hpp 5bdd520c9e0bcc0a2d3a4554cc4ced99dcf78b51 
  3rdparty/libprocess/src/process.cpp 67f7f9b3b05c8bc9b0f6281689223996ddfa68d1 
  3rdparty/libprocess/src/tests/http_tests.cpp 68d1a1b2ed5645d861b1e613aed9731368ebdc6a 

Diff: https://reviews.apache.org/r/16839/diff/


Testing
-------

added new unit tests
make check


Thanks,

Charlie Carson