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

Enable cookies to be available at response with Onyx::HTTP::Spec #24

Closed
wants to merge 1 commit into from

Conversation

@RemiKalbe
Copy link
Contributor

commented Aug 2, 2019

I came across a case when I need to check a cookie from an HTTP request's response at testing.

@RemiKalbe RemiKalbe changed the title Enable cookies to be available at response. Enable cookies to be available at response with Onyx::HTTP::Spec Aug 2, 2019
@RemiKalbe

This comment has been minimized.

Copy link
Contributor Author

commented Aug 2, 2019

It's pretty much synthetic sugar as you can use headers to check cookies, but it's more intuitive as you can use

context.response.cookies["cookie-name"]

with the onyx framework.

So using

response = Onyx::HTTP::Spec.method( ... )
response.cookies["cookie-name"]

with specs seems more seamless and logical

Copy link
Member

left a comment

Thanks!

@vladfaust

This comment has been minimized.

Copy link
Member

commented Aug 13, 2019

It's been merged.

@vladfaust vladfaust closed this Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.