URL encodes a HTTP cookie.
#include "am_utls.h" AM_EXPORT am_status_t am_http_cookie_encode(const char *cookie, char *buf, int len);
This function takes the following parameters:
The cookie to be URL encoded.
The buffer to put the encoded cookie.
The size of the buffer.
This function returns am_status_t with one of the following values:
If the cookie was successfully encoded and copied into buf.
If the cookie or buffer was NULL or len was smaller than the size of the encoded value.
Other error occurred while encoding cookie.