James Lee

Results 23 comments of James Lee

one solution for me was to create an axios plugin that exports $axios ``` let axios = null export default ({store, $axios}) => { console.log('axios plugin init') $axios.setToken(store.state.token) axios =...

@pi0 the export import was added in for a different reason. It was so I can import from my store so I don't have to pass in axios to all...

Also what is the difference between accessing $axios from the context vs grabbing from ctx.app

Yes you do have to set on both. I'd break down your get cookie logic with isserver and isclient On Fri, Jul 28, 2017, 4:40 AM awronski wrote: > Hello...

@pi0 by any chance is there a sample code to also inject axios into the vuex action dispatcher? On Fri, Jul 28, 2017, 9:55 AM Pooya Parsa wrote: > @awronski...

I don't think you want to use defaults. That affects it globally. The axios module has a set token method avail for you to use. On Fri, Jul 28, 2017,...

Interesting. I do have a working version on my project right now. My approach was to set the token into the store during nuxtserverinit and then set the token again...

Awesome solution. Where is the store passed in from and which store instance is this? But man handling axios is pretty scary. I would have thought axios is segmented as...

Thank you! On Sun, Aug 13, 2017, 7:41 AM Pooya Parsa wrote: > Axios module has a new home > and finally, SSR is safe > to use setToken and...

> @awronski As of rc2 we have a magical feature which allows doing that once. Just give us little more time as there are lots of works while preparing final...