Added support for headers in the API responses