hippie icon indicating copy to clipboard operation
hippie copied to clipboard

Feature request: Make jar function from request accessible

Open chdanielmueller opened this issue 8 years ago • 6 comments

Hi, Could you please make the jar function from request accessible? https://github.com/request/request#requestjar With this function it would be possible to create multiple cookie jars. Thanks, Daniel

chdanielmueller avatar Dec 25 '15 21:12 chdanielmueller

makes sense. wanna try to tackle it?

maybe we can simply yield the request object:

hippie().configure((request) => {
   const jar = request.jar();
   request.defaults({ jar });
   return request;
});

does this make sense? it also introduces a nice side effect which will enable people to replace the request module with something that has the same API.

vesln avatar Dec 26 '15 05:12 vesln

Hey @vesln I tried my best but I didn't get it to work... I rewrote my mocha tests to work around this issue. Sorry that I was not able to contribute to your amazing project. Keep up the good work.

chdanielmueller avatar Feb 01 '16 15:02 chdanielmueller

@chdanielmueller no worries! If there is anything I can do to help you implement it, please let me know!

vesln avatar Feb 01 '16 18:02 vesln

@vesln If you get the time to implement this by yourself it would be cool. It's quite a workaround which I am using at the moment.

chdanielmueller avatar Feb 02 '16 12:02 chdanielmueller

I will add it to my queue.

@CacheControl would you be interested in giving this a try?

vesln avatar Feb 02 '16 14:02 vesln

@vesln I'm currently in the middle of a couple projects and don't have much bandwidth, but I'll add it to my queue as well

CacheControl avatar Feb 09 '16 16:02 CacheControl