Moved request/response to api to fix test compilation