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

Add Newtonsoft.Json version to X-Stripe-Client-User-Agent #2103

Merged
merged 1 commit into from
Jul 1, 2020

Conversation

ob-stripe
Copy link
Contributor

r? @remi-stripe
cc @stripe/api-libraries

Add Newtonsoft.Json version to X-Stripe-Client-User-Agent header.

Unfortunately AFAICT Newtonsoft.Json does not expose its version number, so I had to resort to some fugly reflection.

I've verified this works by spying on the requests:

X-Stripe-Client-User-Agent: {"bindings_version":"37.15.0","lang":".net","publisher":"stripe","stripe_net_target_framework":"net45","lang_version":"Mono 6.4.0.198 (2019-06/fe64a4765e6 Wed)","os_version":"Unix 19.4.0.0","newtonsoft_json_version":"9.0.1.19813"}

Copy link
Contributor

@remi-stripe remi-stripe left a comment

Choose a reason for hiding this comment

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

That looks good to me and is consistent with other parts of the code. Curious how various frameworks react to this but as long as it can't break anyone that seems totally viable

@stripe-ci stripe-ci assigned ob-stripe and unassigned remi-stripe Jul 1, 2020
@ob-stripe ob-stripe merged commit b62c975 into master Jul 1, 2020
@ob-stripe ob-stripe deleted the ob-send-newtonsoft-version branch July 1, 2020 21:14
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.

None yet

2 participants