On Tue, Nov 12, 2013 at 11:20 AM, Patrick Moy <ptmoy2@gmail.com> wrote:
Klacke, thanks for your reply.

I got it working with Steve Vinoski's help.  As it turns out, I was using set_cookie/3 incorrectly.  Looking at the examples on the yaws website, I was under the impression that I just have to call the set_cookie function, and Yaws would automatically insert the resulting cookie tuple into my out/1 return value, so my erroneous code looks like this:

yaws_api:set_cookie ("foo", "bar", []),
[{status, 200}, {content, "text/html", Body}].

By changing code to this:

C = yaws_api:set_cookie ("foo", "bar", []),
[{status, 200}, {content, "text/html", Body}, C].

everything worked.


I updated the documentation on master to 1) make the cookie examples use set_cookie instead of the deprecated setcookie functions, and 2) to try to clarify the aspect of the documentation that Patrick rightfully found confusing.