robinhood / thorn

Easy Webhooks for Python
Other
525 stars 60 forks source link

Celery dispatcher does not set custom headers #18

Open fatboystring opened 7 years ago

fatboystring commented 7 years ago

Problem

Celery dispatcher does not set custom HTTP headers for webhook requests.

I am pretty sure the headers are being dropped because they are not included in the returned dict when the Request.as_dict method is called from here

I propose to ensure that Request.as_dict returns the existing dict, but with the request instances headers (_headers) included. If this seems like a reasonable solution please let me know and I'll get a PR submitted.

Environment

thorn 1.5.0