restore support for sending http post data, add unit test