We need a cookie example

We would like to use cookies; however, it is unclear how to do this based on the documentation provided by Netsilicon. Is there additional information on how to use cookies with the Advanced Web Server? An example would be especially appreciated.

Our AWS web server supports 10 cookies for each request. Currently, we do not have samples, but we will implement sample soon. There are two ways to use cookies in server side application. 1. Use external cgi. In RpExternalCgi(void *theTaskDataPtr,rpCgiPtr theCgiPtr) rotine, you can call callback routine void RpSetHttpCookie(void *theTaskDataPtr, Unsigned8 theIndex, char * theCookie) to set up the cookie you want. Then these cookies will be sent to client browser. parameters; theTaskDataPtr the same as the first one in RpExternalCgi(). theIndex the index of the request cookie array, from 0, 1, 2,…,9. theCookie your cookie. 2. Use a form to allow the user to put his cookies. Design a form post page with cookie input, and implenment getfunction() and setfunction(). In the setfunction() to call RpSetHttpCookie(). Later we will post sample on how to use cookie.

“Later we will post sample on how to use cookie.”

OK, it’s 7 years later :slight_smile:

I can’t find anything in the NetOS 7.4 docs or on this forum on how to get data from a cookie.

Within the documentation set, there is a document (soft copy) entitled Advanced Web Server Toolkit. Cookie management APIs are explained therein.