Skip to content

Conversation

benmvp
Copy link
Contributor

@benmvp benmvp commented Apr 5, 2016

At Eventbrite we're building a Node render server to connect with our Django backend. We need to pass the language from Django to Node. The API of the server expects the language to be passed in the request headers as Accept-Language.

python-react passes the request header for the Content-type, but doesn't provide a facility to add additional request headers. This PR does that. While it is a change to the API, it should be backwards compatible since it's an additional defaulted parameter (request_headers). However, I imagine that anyone who has created their own renderer would have to update the API so that it accepts this 4th parameter.

I added a test as well as updated the relevant documentation. We are currently pointing to my fork, but would love for this change to be folded back in and published to NPM.

Let me know if you need any updates!

benmvp and others added 2 commits April 5, 2016 09:44
@markfinger
Copy link
Owner

Cool. Thanks for that!

@markfinger markfinger merged commit b11ad94 into markfinger:master Apr 5, 2016
@markfinger
Copy link
Owner

That's been pushed to PyPI. Thanks again!

@benmvp
Copy link
Contributor Author

benmvp commented Apr 5, 2016

Awesome!

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.

3 participants