Fixed issue with empty response body.

Fixed issue - if a response has an empty body then the task result is not set.