You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Taymindis Woon edited this page Jan 9, 2019
·
8 revisions
fcgi Function has built in allocation memory management, it will be auto free for every session request.
Sample:
voidgetProfile(ffunc_session_t*session) {
int*newId= (int*)ffunc_alloc(session, sizeof(int));
flog_info("%s\n", "you reach here with get Request");
if (session->query_str) {
char*userID= (char*) ffunc_get_query_param(session, "userId", sizeof("userId") -1);
if (userID) {
*newId=atoi(userID);
write_out("This user %s has new id= %d\n", userID, *newId); // the param @userId
}
}
}