Skip to content

Conversation

@ShibaniMahapatra
Copy link
Contributor

Currently this library supports only 'application/json' as content-type, This PR aims in adding support to the other content-type supported by Github for webhooks i.e. 'application/x-www-form-urlencoded'.

This support makes python-github-webhook fully compatible with the github webhooks.

Signed-Off-By: Shibani Mahapatra [email protected]

@ShibaniMahapatraShibaniMahapatraforce-pushed the feat/content-type branch 3 times, most recently from 994548f to 83fdc38CompareDecember 5, 2019 15:48
@ShibaniMahapatra
Copy link
ContributorAuthor

@alexchamberlain Please review this PR, and let know if any changes are required.

Copy link
Contributor

@alexchamberlainalexchamberlain left a comment

Choose a reason for hiding this comment

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

Hi @ShibaniMahapatra, thanks for your contribution. Sorry for the delay; I've had some personal commitments running up to Christmas.

For context, what is the reason you specifically want the form encoding to be supported over the JSON format?

To land this, please can you add a test that uses form encoded data?

@ShibaniMahapatra
Copy link
ContributorAuthor

@alexchamberlain
The reason for supporting this content-type is to provide support for users who are already using 'application/x-www-form-urlencoded' as the content-type instead of 'application/json', so that they can also seamlessly integrate with github webhooks with this library.

Since github supports two content-type, it will be good to provide support for those two types. Earlier this library was supporting only 'application/json'.
So finally this library will support both 'application/json' and 'application/x-www-form-urlencoded' as content-type.

Also, I have committed testcases for the 'application/x-www-form-urlencoded' content-type.
Please review it. Thanks.

Add support for Content-Type: application/x-www-form-urlencoded, so that `python-github-webhook` supports both Content-Types supported by GitHub webhooks. Signed-Off-By: Shibani Mahapatra <[email protected]>
@alexchamberlainalexchamberlain merged commit 8d3ad24 into bloomberg:masterDec 31, 2019
@alexchamberlain
Copy link
Contributor

Released as 1.0.3; @ShibaniMahapatra Thank You for your contribution; really appreciate it!

@ShibaniMahapatra
Copy link
ContributorAuthor

Thank you @alexchamberlain. Looking forward to many such contributions. 👍

Sign up for freeto 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

@ShibaniMahapatra@alexchamberlain