You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to use rnet to generate cookies from a website. The issue is that we don't get all the cookies by calling the url once. Hece we need to use the same "session" to generate all the cookies.
For example:
URL: https://abc.com/xyz
Scrape call 1 to URL: Cookies = {A=B, C=D}
Scrape call 2to URL: Cookies = {E=F, G=H}
In the example above, cookies E and G get generated post the generation of cookies A and C, provided the calls are made using the same session.
We tried to use the same Client() object for both the scrape calls but we were faced with the following exception.
Due to Rust's memory management with borrowing,
you cannot use certain instances multiple times as they may be consumed.
This error can occur in the following cases:
1) You passed a non-clonable instance to a function that requires ownership.
2) You attempted to use a method that consumes ownership more than once (e.g., reading a response body twice).
3) You tried to reference an instance after it was borrowed.
Potential solutions:
1) Avoid sharing instances; create a new instance each time you use it.
2) Refrain from performing actions that consume ownership multiple times.
3) Change the order of operations to reference the instance before borrowing it.
How can we use the same session across requests in rnet? We unfortunately could not find any documentation regarding this.
S-needs-more-infoMore information is required to understand the issue
1 participant
Converted from issue
This discussion was converted from issue #530 on March 01, 2026 00:35.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We would like to use rnet to generate cookies from a website. The issue is that we don't get all the cookies by calling the url once. Hece we need to use the same "session" to generate all the cookies.
For example:
In the example above, cookies E and G get generated post the generation of cookies A and C, provided the calls are made using the same session.
We tried to use the same
Client()object for both the scrape calls but we were faced with the following exception.How can we use the same session across requests in rnet? We unfortunately could not find any documentation regarding this.
Beta Was this translation helpful? Give feedback.
All reactions