Checking content for utf-8

This is retrieving the response headers and testing the content/type variable to see if the content is utf-8.
If it is, it is assigning a string variable str_content with the decoded utf-8 contents