def get_encoder(self, encoding):
        """
        Given the value of the encoding, return the appropriate encoder for
        handling the request content.
        """
        content_type = encoding.split(";")[0].strip().lower()
        main_type = content_type.split("/")[0] + "/*"
        wildcard_type = "*/*"

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

        text = "Unsupported encoding '%s' for request." % encoding
        message = exceptions.ErrorMessage(text=text, code="cannot-encode-request")
        raise exceptions.ClientError(messages=[message])

        Given the value of the encoding, return the appropriate encoder for
        handling the request content.
        
apistar/client/transports.py