Add test for empty response
Add sync timeout and test
Tidy up timeout test
Add handling of various HTTP status codes