Skip to content
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

feat: implement set_cookie function #870

Merged
merged 10 commits into from
Jul 3, 2024
Merged

Conversation

VishnuSanal
Copy link
Contributor

@VishnuSanal VishnuSanal commented Jun 24, 2024

Description

This PR fixes #854

Copy link

vercel bot commented Jun 24, 2024

@VishnuSanal is attempting to deploy a commit to the sparckles Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

codspeed-hq bot commented Jun 24, 2024

CodSpeed Performance Report

Merging #870 will not alter performance

Comparing VishnuSanal:cookie (e83bf48) with main (1e33769)

Summary

✅ 109 untouched benchmarks

🆕 1 new benchmarks

Benchmarks breakdown

Benchmark main VishnuSanal:cookie Change
🆕 test_cookies[fakesession-fake-cookie-session-value] N/A 4.7 ms N/A

@sansyrox
Copy link
Member

@VishnuSanal , could you add some integration tests?

src/types/response.rs Show resolved Hide resolved
src/types/response.rs Outdated Show resolved Hide resolved
@sansyrox
Copy link
Member

@VishnuSanal , great work! Could you please update the Response class in robyn.pyi file with the updated docstring and method?

Also, could you add relevant docs to the documentation?

robyn/robyn.pyi Outdated Show resolved Hide resolved
@VishnuSanal VishnuSanal requested a review from sansyrox July 2, 2024 15:39
robyn/robyn.pyi Outdated
@@ -285,6 +285,8 @@ class Response:
headers (Union[Headers, dict]): The headers of the response or Headers directly. e.g. {"Content-Type": "application/json"}
description (Union[str, bytes]): The body of the response. If the response is a JSON, it will be a dict.
file_path (Optional[str]): The file path of the response. e.g. /home/user/file.txt

set_cookie (Callable): The function to set a cookie (onto headers).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed. We only document the attributes

robyn/robyn.pyi Outdated Show resolved Hide resolved
Copy link
Member

@sansyrox sansyrox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@sansyrox sansyrox merged commit b5a867f into sparckles:main Jul 3, 2024
58 of 59 checks passed
@VishnuSanal VishnuSanal deleted the cookie branch July 4, 2024 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add a set cookie interface in the response object
2 participants