add sendhttprequest function