Session file with cookie cannot be parsed
See original GitHub issueChecklist
-
[Y] I’ve searched for similar issues.
-
[Y] I’m using the the latest version of HTTPie.
-
httpie version, 2.4.0
-
python version, 3.9
I prepared the my-session-cookie.json file, the request parameters are placed in query.json, and the expected response results are placed in the result.json file.
my-session-cookie.json like this:
{ "__meta__": { "about": "HTTPie session file", "help": "https://httpie.org/doc#sessions", "httpie": "2.4.0" }, "headers": { "Content-Type": "application/json", "cookie": "12345" } }
And command like this:
http --verify=no -v --session-read-only=~/Desktop/my-session-cookie.json POST http://localhost:8301/test < ~/Desktop/query.json -d >>~/Desktop/result.json
And I got error like this:
http: error: RuntimeError: OrderedDict mutated during iteration
Then I did some test and the request can be executed
- remove cookie field
- OR remove
-d >>~/Desktop/result.json
in the command
So what’s wrong?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
@BoboTiG @jokull Thank you for your timely handling work, my httpie util is online again, ✌️! ‘cause can’t wait for the release version, I directly install the latest versio from the master. 😎 Of course, I am looking forward to the next release version! 🤝
Sry, I missed this msg. In debug mode:
CASE 1:
CASE 2:
Case 1, http: error: RuntimeError: OrderedDict mutated during iteration CASE 2, can parse session file and can send http request
I wonder, sending a request with a cookie and writing the response to a specified file be supported at the same time? I remember that older versions, such as version 2.0.0, are supported.