Added new functionality for changing responseType.