Change logical implementation

Fix logic to work properly and pass the content of the html response
rather than the response object