Added a newline at end of file.
Added support for requestDefaults

This is useful for proxy configuration etc.
Added error handling
Updated documentation
Merge pull request #1 from andersjanmyr/request-options-and-error-handling

Request options and error handling