Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move request-sending functionality into a common place #1654

Conversation

pakrym-stripe
Copy link
Contributor

@pakrym-stripe pakrym-stripe commented Jan 12, 2023

Currently all the request making logic in stripe-node resides in StripeResource. We'd like to be able to make requests from arbitrary places without a resource object.

This PR moves the request-making logic into RequestSender class and place an instance of it onto the main Stripe client.

This follows the pattern we have in Java with https://github.com/stripe/stripe-java/blob/master/src/main/java/com/stripe/net/StripeResponseGetter.java#L8

src/RequestSender.ts Outdated Show resolved Hide resolved
src/RequestSender.ts Show resolved Hide resolved
src/Types.d.ts Outdated Show resolved Hide resolved
test/makeRequest.spec.js Show resolved Hide resolved
lib/makeRequest.js Outdated Show resolved Hide resolved
@anniel-stripe
Copy link
Contributor

Mostly questions!

@pakrym-stripe pakrym-stripe merged commit 3c9e553 into master Jan 13, 2023
@remi-stripe remi-stripe deleted the pakrym/Move_request-sending_functionality_into_a_common_place branch September 28, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants