Created
February 4, 2016 09:50
-
-
Save jonnyreeves/17f91155a0d4a5d296d6 to your computer and use it in GitHub Desktop.
Testing Cookie Writes in Golang
This solution is not adapter for new version of golang. You will have :
recorder.HeaderMap is deprecated: HeaderMap exists for historical compatibility and should not be used. To access the headers returned by a handler, use the Response.Header map as returned by the Result method.
You should use :
recorder.Result().Cookies()[0]
as @mfhholmes mentionne.
You can get the value with : recorder.Result().Cookies()[0].Value
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
or you could just look at recorder.Result().Cookies()