change the api request variable name and add the connection close header so that we don't leave the HTTP connection hanging.