Skip to content

Conversation

@henrylamchan
Copy link
Contributor

Overview

Expose data and params for the request helper as pass through kwargs. This'd allow to make the oauth post call with query params. Straightforward abstraction that I hope doesn't cause much confusion in the future.

@codecov
Copy link

codecov bot commented Mar 18, 2020

Codecov Report

Merging #16 into master will decrease coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #16      +/-   ##
==========================================
- Coverage   96.35%   96.26%   -0.09%     
==========================================
  Files           8        8              
  Lines         137      134       -3     
==========================================
- Hits          132      129       -3     
  Misses          5        5              
Impacted Files Coverage Δ
workos/audit_trail.py 100.00% <ø> (ø)
workos/utils/request.py 94.28% <100.00%> (-0.46%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update def7f11...2cd6fa3. Read the comment docs.

request_fn = getattr(requests, method)
if method == REQUEST_METHOD_GET:
response = request_fn(url, headers=headers, params=params)
response = request_fn(url, headers=headers, data=data, params=params)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be sending any data during a GET request?

Copy link
Contributor

@maxchehab maxchehab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@henrylamchan henrylamchan force-pushed the 202003_expose_data_and_params_for_request_helper branch from 5377714 to e165905 Compare March 18, 2020 18:12
@henrylamchan henrylamchan merged commit c446001 into master Mar 18, 2020
@henrylamchan henrylamchan deleted the 202003_expose_data_and_params_for_request_helper branch March 18, 2020 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants