mock http requests and test exit code (closes #4)