Skip to content

CDK: Allow specifying aribtrary keyword args to an outgoing HTTP request #4489

Closed
@sherifnada

Description

@sherifnada

Tell us about the problem you're trying to solve

A user may want to set extra options on the request.send method such as auth, cert, or others.

Describe the solution you’d like

I want to expose a method on HttpStream as follows:

def request_kwargs(self) -> Mapping[str, Any]: 
    """  
    returns a mapping of keyword arguments to be used when creating the HTTP request. 
    See https://docs.python-requests.org/en/master/user/advanced/ for various options which can be returned from 
    this method. 

    any args returned from this method will be flattened into the outgoing request via something 
    like `requests.get(url, **self.request_kwargs())`. 
    """

Describe the alternative you’ve considered or used

Use the Stream class directly

Metadata

Metadata

Assignees

No one assigned

    Labels

    CDKConnector Development Kittype/enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions