How to Set Cookie

Because Cookie is a small piece of information stored in the server browser, so this setting should be initiated by the server, set up is to add in the Response Header: Set-Cookie field, the value is more than key-value pairs are as follows:

// Response Header
Set-Cookie: foo=bar; li=lei

 

note: 

1. the Response Header can be added to a plurality of Set-Cookie field;

2. a Set-Cookie field may be added a plurality of Cookie, and "semi-colon" + "space" separated.

Guess you like

Origin www.cnblogs.com/aisowe/p/11565926.html