Add support to custom handling of API response.