-
Notifications
You must be signed in to change notification settings - Fork 385
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
Webhooks coming in with application/xml
in the Accept
header
#909
Comments
@agrobbin, thanks for reporting the issue! We just deployed a change to update the Accept headers to |
That's great to hear @gracegoo-stripe! I just tested it out, and it looks much less confusing. 😆 Stripe CLI:
Rails server output:
|
I was doing some testing of my webhooks implementation yesterday (with test/non-production keys, API version |
Hi team, |
I am also having the same issue while integrating Stripe Connect Express. The webhook is being processed as XML by the server instead of JSON for the account creation and linking with the Ruby on Rails SDK. Please help! The stripe SDK is 10.6.0 Update - figured it out, for future readers going through the same issue, adding both headers helped to send the json data as parseable HTML instead of unparseable XML. From your local logs, you can see the data is JSON but I am assuming at least Ruby on Rails can't recognize it? Hope this helps! -H "Accept:/" |
I wasn't sure where to put this issue, so if it should go to a different repo, or through a different channel from GitHub altogether, please let me know!
Issue
When testing out receiving webhooks in my Rails app, I was surprised by this output:
XML
seemed like a very odd choice, but sure enough, when looking at the webhook request details coming in through the Stripe CLI w/ a debug log level (newlines/indentation added for readability):Rails is doing the right thing, based on the
Accept
header being sent with the webhook request.Expected Behavior
I would have expected the
Accept
header to at the very least preferapplication/json
, or leave it as simply*/*
. Seeingapplication/xml
definitely caught me by surprise.The text was updated successfully, but these errors were encountered: