Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cookie.path; // $ExpectType string
cookie.secure; // $ExpectType boolean | undefined
cookie.session; // $ExpectType boolean | undefined
cookie.value; // $ExpectType string | undefined
cookie.update(cookieDef); // $ExpectType void
cookie.valueOf(); // $ExpectType string
pmCollection.Cookie.isCookie({}); // $ExpectType boolean
pmCollection.Cookie.parse("string"); // $ExpectType CookieDefinition
pmCollection.Cookie.splitParam("string"); // $ExpectType { key: string; value: string | boolean; }
// CookieList Tests
const cookieList = new pmCollection.CookieList(null, [cookie]);
pmCollection.CookieList.isCookieList(cookieList); // $ExpectType boolean
// DescriptionDefinition Tests
const descDef: pmCollection.DescriptionDefinition = {
content: "string",
type: "string"
};
descDef.content; // $ExpectType string
descDef.type; // $ExpectType string | undefined
// Description Tests
let desc = new pmCollection.Description();
desc = new pmCollection.Description("string");
this.jar.getCookies(url.toString(true), options, function (err, cookies) {
if (err) {
return callbackHandler(callback, err);
}
callbackHandler(callback, null, new PostmanCookieList(null, cookies && cookies.map(deserialize)));
});
};
cookieJar.getCookies(requestOptions.url, function (err, cookiesFromJar) {
if (err) {
return done();
}
cookies = _.transform(cookiesFromJar, function (acc, cookie) {
acc.push(toPostmanCookie(cookie));
}, []);
cookies = new sdk.CookieList(null, cookies);
done();
});
}
cookieJar.getCookies(requestOptions.url, function (err, cookiesFromJar) {
if (err) {
return done();
}
cookies = _.transform(cookiesFromJar, function (acc, cookie) {
acc.push(toPostmanCookie(cookie));
}, []);
cookies = new sdk.CookieList(null, cookies);
done();
});
}
else {
cookies = new sdk.CookieList(null, []);
done();
}
};