Comments (6)
I cannot replicate this, can you post how you are attempting to use this?
from unirest-nodejs.
I nailed it by manually concat the cookie string and set it in the header, anyway, it works.
The problem remains. It's extremely easy for me to replicate it by simply putting these four lines in an empty file:
var unirest = require('unirest');
var CookieJar = unirest.jar();
CookieJar.add(unirest.cookie('some value'));
unirest.get('http://httpbin.org/get').jar(CookieJar);
And it turns out:
/xxxx/test.js:4
CookieJar.add(unirest.cookie('some value'));
^
TypeError: Object # has no method 'add'
at Object. (/xxx/test.js:4:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
from unirest-nodejs.
By the way, I'm working on OS X 10.6, Node.js v0.10.23 and I also installed automata in the same workspace.
Everything else with unirest is just fine. Thanks for your great job.
from unirest-nodejs.
same here!
CookieJar is just a simple object...
var CookieJar = unirest.jar(); // { _jar: { store: { idx: {} } } }
...there is no 'add' function at all.
(working on Windows 7; Node.js v0.8.9)
from unirest-nodejs.
Hmm, Alright, I will look more into it, can you guys tell me what you are specifically doing?
from unirest-nodejs.
You guys are right, the merge that happened recently broke the cookiejar, I have restored it to it's glory in 0.1.8
:)
from unirest-nodejs.
Related Issues (20)
- npm audit failure HOT 3
- How to save/re-use cookies from file? HOT 2
- Is it possible to upload (attach) file/image as base64 HOT 1
- Maintainers? HOT 2
- version of unirest of kong need upgrade HOT 1
- Passing a Buffer to .attach HOT 5
- TypeError [ERR_HTTP_INVALID_HEADER_VALUE]: Invalid value "undefined" for header "Content-Length" HOT 5
- header type check bug
- Set specific agent per request
- Uploading file with metadata using unirest js api causing trouble when sending data
- Request.part()
- Does this library support async / await or not?
- http://unirest.io/nodejs doesn't work HOT 1
- await/async or .then options
- Setting .strictSSL(false) does not work for .attach() HOT 1
- Unirest is running asynchronously
- Potential security issue
- Problem sending files via HTTP request for TestRail.
- Still maintained?
- unirest is not working for node 12.x
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unirest-nodejs.