You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Creating two clients re-uses variables from the first client #2
I'm sending a video out to two different clouds using the Node.js client.
When I create a second client, I get an error that the API request wasn't properly signed. It appears that the Panda client is caching variables internally, which makes it impossible to use it twice in an app.
The script works fine if I use either the configuration data from cloudA or from cloudB.
varclientA,clientB,options,panda;panda=require('panda');options={source_url: 'http://example.com/my-video.mov',payload: 'my-video',path_format: 'my-video/:id'};clientA=panda.createClient(config['cloudA']);clientA.post('/videos.json',options,function(response){returnconsole.log(response);});// This throws an error about the wrong URL and args. Works fine alone.clientB=panda.createClient(config['cloudB']);clientB.post('/videos.json',options,function(response){returnconsole.log(response);});
Activity
zimbatm commentedon Jul 15, 2013
/cc @vivienschilis
vivienschilis commentedon Jul 15, 2013
Hi @topfunky, we were not 'Watching' this repo strangely.
We fixed the issue on master I think.
Can you have give it a try?
vivienschilis commentedon Jul 15, 2013
Oh ok no I think I found the issue.
vivienschilis commentedon Jul 15, 2013
Actually,
I did this test:
https://gist.github.com/vivienschilis/6000075
I and I get two different results.
What's your nodejs version?
vivienschilis commentedon Jul 15, 2013
Ok can actually, can you use git master and tell me if that works. thx
vivienschilis commentedon Jul 15, 2013
Ok I updated npm with the latest version
topfunky commentedon Jul 15, 2013
Thanks, Vivien! I'll try it out.
On Mon, Jul 15, 2013 at 7:17 AM, Vivien Schilis notifications@hub.lumenfield.workwrote:
Geoffrey Grosenbach
boss@topfunky.com
........................
PeepCode Screencasts
http://peepcode.com