terraform-snowflake-api-integration-with-geff-aws icon indicating copy to clipboard operation
terraform-snowflake-api-integration-with-geff-aws copied to clipboard

Support dict type for json argument

Open sfc-gh-pkommini opened this issue 4 years ago • 1 comments

In this function:

def process_row(
    data: Optional[Text] = None,
    base_url: Text = '',
    url: Text = '',
    json: Optional[Text] = None,
    method: Text = 'get',
    headers: Text = '',
    kwargs: Union[Dict, Text] = '',
    auth: Text = None,
    params: Text = '',
    verbose: bool = False,
    cursor: Text = '',
    results_path: Text = '',
    destination_uri: Text = '',
):

We need to support dict type for json argument.

sfc-gh-pkommini avatar Jun 17 '21 05:06 sfc-gh-pkommini

maybe —

        req_data: Optional[bytes] = (
            dumps(json) if isintance(json, dict)
            else json if json.startswith('{')
            else dumps(parse_header_dict(json))
        ).encode()

in process_http.py#88?

sfc-gh-afedorov avatar Jul 15 '21 01:07 sfc-gh-afedorov