mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-27 17:15:49 +03:00
[GH-ISSUE #886] scripting, how to rewrite cookie for the reqeust? #882
Labels
No labels
Discussion
Feature request
In Progress...
Plugins
Waiting response
Windows
Windows
bug
duplicate
enhancement
feature
good first issue
iOS
macOS 10.11
question
wontfix
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxyman#882
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Thanatos-L on GitHub (May 12, 2021).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/886
Originally assigned to: @NghiaTranUIT on GitHub.
Proxyman version? (2.25.0)
macOS Version? (mac 11.3)
Steps to reproduce
I am so happy to find an elegance tool.
I have problem about how to set cookie in request.
I have tried:
Above code is not work, looking forward reply and thank you for your time!
Expected behavior
Screenshots (optional)
@NghiaTranUIT commented on GitHub (May 12, 2021):
Hey @Thanatos-L
The cookie is actually a key-value on the header, so you can set it like the following code:
Example with complex cookies:
You can combine all cookie into a string with
;as a delimiter 👍@Thanatos-L commented on GitHub (May 12, 2021):
It works, I have wrong description about the question.
request.headers["Cookie"] = "my_key=myvalue";Rewrite all my cookies and only my_key=myvalue left.
I need to add new cookie incremental, thank you
@NghiaTranUIT commented on GitHub (May 12, 2021):
So, it would look like:
@Thanatos-L commented on GitHub (May 12, 2021):
Got it, I am not familiar with js so I can not image how to that at the first.
Thanks a lot!