Added method to create a response object from a string