Closed nicolai86 closed 8 years ago
Hi ,
Silk is really cool. I too have the same issue on handling cookie based authentication with Silk
Great question. Right now it doesn't. How should it?
On 11 Feb 2016, at 20:23, Raphael Randschau notifications@github.com wrote:
Hey!
Silk looks interesting! How does it handle dependent api requests, and cookie based authentication?
Eg a user logs in, then CRUDs a todo?
— Reply to this email directly or view it on GitHub.
Gophers can use the runner package to do this easily enough I think. But I wonder if it's common enough a problem to solve in the docs?
On 12 Feb 2016, at 08:04, ajayep notifications@github.com wrote:
Hi ,
Silk is really cool. I too have the same issue on handling cookie based authentication with Silk
— Reply to this email directly or view it on GitHub.
For cookies, how about this:
## GET /protected-resource
* Cookie: authtoken=value
* Cookie: name=John
Cookie set by the server needs to be copied by the client for all subsequent requests. I believe this would involve some tweak in the runner package as well.
@matryer I like your markdown suggestion. This would be really great!
How would it look like if you'd want to store the cookie only for subsequent requests, eg its value is determined by first request but should be stored for subsequent requests?
I think https://github.com/matryer/silk/issues/2 would address the sharing/reusing data, and cookies should be included too.
@nicolai86 @ajayep
Can you guys please review this: https://github.com/matryer/silk/pull/27
It turns out, you can already set cookies using HTTP headers :) That was a nice surprise.
@matryer it works, but without #2 it's of no use to me since I need to store server send values and use them in subsequent requests.
Please try #2, now implemented in v0.4.0
Hey!
Silk looks interesting! How does it handle dependent api requests, and cookie based authentication?
Eg a user logs in, then CRUDs a todo?