title: Setting cookies in mojolicious response
body: <p>How do i set a cookie in mojolicious response and later read it from the request. I tried different ways but none of them set cookie on the response object.</p>
  
  <p>tried these ways</p>
  
  <pre><code>$self-&gt;res-&gt;cookies({name =&gt; 'foo', value =&gt; 'bar'});
  $self-&gt;res-&gt;headers-&gt;set_cookie('foo=bar');
  $self-&gt;res-&gt;headers-&gt;cookie('foo=bar');
  </code></pre>
  
  <p>plz, help!!</p>
  
  <p>thanks.</p>