Abstracted HTTP client specific logic
Added null argument tests