Skip to content

Comments

Adds stringified cookie object to data#3

Open
timmyw wants to merge 2 commits intohudson-taylor:masterfrom
timmyw:add-stringified-cookies-to-data
Open

Adds stringified cookie object to data#3
timmyw wants to merge 2 commits intohudson-taylor:masterfrom
timmyw:add-stringified-cookies-to-data

Conversation

@timmyw
Copy link
Contributor

@timmyw timmyw commented Sep 15, 2016

This is that change discussed earlier - just for cookies so far. It's cludgy, but will only add overhead if the call to hte() includes cookies in the array of data sources

@coveralls
Copy link

coveralls commented Sep 15, 2016

Coverage Status

Coverage decreased (-4.3%) to 90.698% when pulling bfd15f1 on timmyw:add-stringified-cookies-to-data into 0e8acc8 on hudson-taylor:master.

lib/index.js Outdated
datas.forEach(function (d) {
if (d === 'cookies') {
// Cookies are stringified and added to data
data['cookies'] = JSON.stringify(req.cookies)
Copy link
Member

@SomeoneWeird SomeoneWeird Sep 15, 2016

Choose a reason for hiding this comment

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

nit: data.cookies

@coveralls
Copy link

coveralls commented Sep 16, 2016

Coverage Status

Coverage decreased (-4.3%) to 90.698% when pulling 3a6a8da on timmyw:add-stringified-cookies-to-data into 0e8acc8 on hudson-taylor:master.

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