implement HTTP rest api code.