Chinaunix首页 | 论坛 | 博客
  • 博客访问: 212811
  • 博文数量: 40
  • 博客积分: 945
  • 博客等级: 准尉
  • 技术积分: 395
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-22 18:45
文章分类
文章存档

2020年(14)

2017年(1)

2013年(1)

2012年(6)

2011年(1)

2010年(7)

2009年(3)

2008年(7)

我的朋友

分类: Windows平台

2020-10-16 13:46:28

转载处:


Join GitHub today

GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
New issue

Delete cookies programmatically #3312

Closed
opened this issue on 26 Jul 2017 · 133 comments

Comments

commented ?

edited


I'm looking for a way to clear cookies between each test, I know I am able to do this via the GUI but I want to do it automatically in the pre-request scripts. I tried document.setCookie = ..., but document isn't defined.
My current work around is to set the cookies into global variables, and use these variables in the header values, which allows me to set the values to empty strings at the beginning of each test.

commented


Hi , sorry about the delay here. This isn't possible right now, but we've been actively looking into this. I'm tagging this as a feature request, and will let you know here when it is out :)

assigned
added the label
mentioned this issue
Closed

commented


Hi, I'm trying to find a workaround in order to neutralize a cookie returned by the server.
Is there a way to get the cookie object ?
currently, if I use pm.cookies, I get an array that contains the cookie, I can even erase it with pm.cookies.clear() but it doesn't erase the cookie (though pm.cookies array is empty).
I wonder how to get the object (pm.cookies[0] does not work) so I could modify its expiry date, for instance.
thank you
Alexandre

commented ?

edited


I found a way to get the cookie object, however the "expires" property is not available :(
I used pm.cookies.idx(0)
is it possible to make it available and writeable ?
well, anyway it is useless, as modifying a propertie through pm.cookies methods is not reflected in postman (ie. I changed the cookie name, I can see it changed when I log pm.cookies but when I open the "Manage Cookies" window in postman, there is no change reflected ...

Member This user is a member of the Postman Inc. organization.

commented


the pm.cookies now allows you read and set cookies. We will be extending it to add more functionality to cookies.

commented


Ok, but does it concerns every cookie (send and received ?) because when I use it to modify a received cookie, I can see the change in pm.cookies but when I enter the cookie management window (on the right hand side of postman windows app) I don't see any update in the concerned cookie ?

commented ?

edited


Hi, is there any update on this issue, or others like this (, I'm looking at you)? As it happens, we had no other option but to turn away from using Postman for anything automated in our company, this is a make-or-break feature for us.

阅读(1190) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~