This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC3235SF: HTTP(S) Server: How to set/get cookies to/from header?

Part Number: LAUNCHXL-CC3235SF

Hello,

I have three questions:

1) I was wondering if there is a way to SET a cookie in the header sent by the HTTP(S) server? 

2) Also, is there a way to parse a received header from a client to get the cookie, if present?

3) Where is the source code for the HTTP(S) server in case I wanted to modify it?

Thanks!

  • Hi Fred,

    I'm assuming you're asking about the internal HTTP server built into our NWP. This is a ROM based HTTP server which we do not release the source code for. Regarding cookies, you do have some control over at the header level when it comes to our HTTP server sending responses to the client. I'm not sure if this is what you're trying to do. Refer to chapter 9 in our programmer's guide for more info on header features and cookies. Table 9-23 might be helpful. 

    Jesu

  • Thank you.  I have looked at 9-23 and observed that there is a "SL_NETAPP_REQUEST_METADATA_TYPE_HTTP_SET_COOKIE" command.  There must also be a way to retrieve a cookie in a GET or POST message from the client. 

    What I need is a way to recognize different clients.  Cookies are the best way to do it.  I'll keep digging.