Added support for exceptions in HTTP requests