Skip to content

Commit

Permalink
Merge branch '73-use-session-request-method' into 'development'
Browse files Browse the repository at this point in the history
Resolve "Use `session.request` method so that self-signed SSL certificates using environment"

Closes #73

See merge request meltano/singer-sdk!45
  • Loading branch information
AJ Steers committed Apr 1, 2021
2 parents 5e0839f + 18c7ba2 commit 210813a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions singer_sdk/streams/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,15 @@ def prepare_request(
url: str = self.get_url(partition)
params: dict = self.get_url_params(partition, next_page_token)
request_data = self.prepare_request_payload(partition, next_page_token)
request = requests.Request(
method=http_method,
url=url,
params=params,
headers=self.authenticator.http_headers,
json=request_data,
).prepare()
request = self.requests_session.prepare_request(
requests.Request(
method=http_method,
url=url,
params=params,
headers=self.authenticator.http_headers,
json=request_data,
)
)
return request

def request_records(self, partition: Optional[dict]) -> Iterable[dict]:
Expand Down

0 comments on commit 210813a

Please sign in to comment.