WordPress / WordPress/Requests
How to navigate cookies
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 500
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 5
Description
I am new to this and sorry if this question is in the wrong area or a basic function that I have overlooked.
I must say that apart from stumbling on navigating cookies I this library has been very easy for me to work with so far :-)
I am trying to use the Requests library to navigate cookies set by a web site.
If I view the raw request data I can see the cookies and get their keys and values.
I can use offsetGet( string $key ) to use the value of a given cookie when I have identified the key, however I can not see any methods that allow me to see how many cookies are in the cookie jar or obtain just the cookies.
It may be a result of the way PHP works, but in the HTTP Requests library in Python I can just say print session.cookies
Is there a similar way in Requests or should I be iterating through them in with the getIterator() function?
Thank you new and confused.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names the Requests cookie jar, offsetGet(string $key), and getIterator(), but no file or test. Start by reviewing the cookie-jar API and existing documentation or examples; done would require a maintainer-approved clarification of how cookies should be inspected or enumerated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- networking
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100