'Construct the necessary HTTP arguments dependent on Binding
:param binding: Which binding to use
:param msg_str: The return message as a string (XML) if the message is
to be signed it MUST contain the signature element.
:param destination: Where to send the message
:param relay_state: Relay_state if provided
:param response: Which type of message this is
:param kwargs: response type specific arguments
:return: A dictionary'

def apply_binding(self, binding, msg_str, destination='', relay_state='', response=False, sign=False, **kwargs):

    if response:
        typ = 'SAMLResponse'
    else:
        typ = 'SAMLRequest'
    if (binding == BINDING_HTTP_POST):
        logger.info('HTTP    POST')
        info = self.use_http_form_post(msg_str, destination, relay_state, typ)
        info['url'] = destination
        info['method'] = 'GET'
    elif (binding == BINDING_HTTP_REDIRECT):
        logger.info('HTTP    REDIRECT')
        info = self.use_http_get(msg_str, destination, relay_state, typ, **kwargs)
        info['url'] = str(destination)
        info['method'] = 'GET'
    elif ((binding == BINDING_SOAP) or (binding == BINDING_PAOS)):
        info = self.use_soap(msg_str, destination, sign=sign, **kwargs)
    elif (binding == BINDING_URI):
        info = self.use_http_uri(msg_str, typ, destination)
    elif (binding == BINDING_HTTP_ARTIFACT):
        if response:
            info = self.use_http_artifact(msg_str, destination, relay_state)
            info['method'] = 'GET'
            info['status'] = 302
        else:
            info = self.use_http_artifact(msg_str, destination, relay_state)
    else:
        raise SAMLError(('Unknown    binding    type:    %s' % binding))
    return info
