def get_decoder(self, content_type=None):
        """
        Given the value of a 'Content-Type' header, return the appropriate
        decoder for handling the response content.
        """
        if content_type is None:
            return self.decoders[0]

        content_type = content_type.split(";")[0].strip().lower()
        main_type = content_type.split("/")[0] + "/*"
        wildcard_type = "*/*"

        for codec in self.decoders:
            if codec.media_type in (content_type, main_type, wildcard_type):
                return codec

        text = (
            "Unsupported encoding '%s' in response Content-Type header." % content_type
        )
        message = exceptions.ErrorMessage(text=text, code="cannot-decode-response")
        raise exceptions.ClientError(messages=[message])

        Given the value of a 'Content-Type' header, return the appropriate
        decoder for handling the response content.
        
apistar/client/transports.py