add default timeout of 5s
trap timeout err
Refactoring and tests.
Minor test cleanup.
Merge branch 'feature/issue-292-add-default-timeout-to-http-api' into develop