Refactor httpSend method using request library