mirror of
https://github.com/lxsang/ant-http
synced 2025-07-13 05:04:21 +02:00
add plugins
This commit is contained in:
32
plugins/cookiex/cookiex.c
Normal file
32
plugins/cookiex/cookiex.c
Normal file
@ -0,0 +1,32 @@
|
||||
#include "../plugin.h"
|
||||
|
||||
void init();
|
||||
call __init__ = init;
|
||||
|
||||
void init()
|
||||
{
|
||||
printf("Finish init\n");
|
||||
}
|
||||
|
||||
void execute(int client,const char* method,dictionary rq)
|
||||
{
|
||||
|
||||
/**
|
||||
* Set cookie to the browser
|
||||
*/
|
||||
char* c = server_time();
|
||||
dictionary d = dict();
|
||||
dput(d,"test",c);
|
||||
dput(d,"test1","This is another cookie");
|
||||
set_cookie(client,d);
|
||||
|
||||
LOG("%s",c);
|
||||
__t(client,"<h1>Set the cookie</h1>");
|
||||
freedict(d);
|
||||
}
|
||||
|
||||
void get(int client,const char* method,dictionary rq)
|
||||
{
|
||||
|
||||
|
||||
}
|
BIN
plugins/cookiex/cookiex.c.o
Normal file
BIN
plugins/cookiex/cookiex.c.o
Normal file
Binary file not shown.
Reference in New Issue
Block a user