modified send_request to accept only GET or POST, updated tests