http post, new http api, other fixing and improvement, test cases