

def _render(self, request, formencode=False, realm=None):
    'Render a signed request according to signature type\n\n        Returns a 3-tuple containing the request URI, headers, and body.\n\n        If the formencode argument is True and the body contains parameters, it\n        is escaped and returned as a valid formencoded string.\n        '
    (uri, headers, body) = (request.uri, request.headers, request.body)
    if (self.signature_type == SIGNATURE_TYPE_AUTH_HEADER):
        headers = parameters.prepare_headers(request.oauth_params, request.headers, realm=realm)
    elif ((self.signature_type == SIGNATURE_TYPE_BODY) and (request.decoded_body is not None)):
        body = parameters.prepare_form_encoded_body(request.oauth_params, request.decoded_body)
        if formencode:
            body = urlencode(body)
        headers['Content-Type'] = 'application/x-www-form-urlencoded'
    elif (self.signature_type == SIGNATURE_TYPE_QUERY):
        uri = parameters.prepare_request_uri_query(request.oauth_params, request.uri)
    else:
        raise ValueError('Unknown signature type specified.')
    return (uri, headers, body)

dataset/ETHPy150Open idan/oauthlib/oauthlib/oauth1/rfc5849/__init__.py Client._render/original