Added support for setting headers in the ApiResponse object.