-
-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a set cookie interface in the response object #854
Comments
@VishnuSanal , would you like to take this up in the coming week? |
可以是这样的: |
request.get_custom_header("server_id","2") |
@xiaojin20 , if it is just header , you should be able to do
I can double check again :D |
File "/usr/local/lib/python3.11/dist-packages/robyn/router.py", line 131, in async_inner_handler
await handler(*args, **kwargs),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/www/website.py", line 122, in logindata
Response.headers["server_id"]=2
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
TypeError: 'getset_descriptor' object does not support item assignment
…---Original---
From: "Sanskar ***@***.***>
Date: Sun, Jun 16, 2024 07:08 AM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [sparckles/Robyn] add a set cookie interface in the responseobject (Issue #854)
@xiaojin20 , if it is just header , you should be able to do
response.headers["server_id"]=2
I can double check again :D
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
有完整简单,示例代码???? |
@app.get("/response") |
Let me add some documentation and share it with you 😄 |
* [#854] feat: implement `set_cookie` function * [#854] fix(ci): fix clippy lint warning * [#854] test: add integration test * [#854] test: update test * [#854] review: update code to use `try_borrow_mut` * [#854] ci: remove unused import * [#796] docs: update `robyn.pyi` * [#796] docs: update docs with `set_cookies` function * docs: add docstring and types * Apply suggestions from code review --------- Co-authored-by: Sanskar Jethi <29942790+sansyrox@users.noreply.github.com>
Something like this
The text was updated successfully, but these errors were encountered: