universal-vue / uvue

Vue CLI plugin to create universal Vue applications with ease
https://universal-vue.github.io/docs/
MIT License
127 stars 13 forks source link

can u add req/res to onHttpRequest's context? #26

Closed xurwxj closed 5 years ago

xurwxj commented 5 years ago

can u add req/res to onHttpRequest's context? It's for the convenience of getting header/cookie from req where process.server is true.

yabab-dev commented 5 years ago

Which adapter do you use ?

xurwxj commented 5 years ago

express

yabab-dev commented 5 years ago

Sorry I cannot reproduce req and res are present in UVue context:

async onHttpRequest({ commit }, { req, res }) {
  console.log(req, res);
}

PS: there is a template to fill issue, please respect it !

xurwxj commented 5 years ago

@chymz tks a lot for your reply. It looks like I'm in the wrong way. At the same time, tks for your reminder. Next time, i'll submit in accordance with the rules.