parsav  Diff

Differences From Artifact [e5e590a634]:

To Artifact [654249752e]:


     1      1   -- vim: ft=terra
     2      2   local m = {}
     3      3   local util = dofile('common.lua')
     4      4   
     5      5   m.method = lib.enum { 'get', 'post', 'head', 'options', 'put', 'delete' }
            6  +m.mime = lib.enum {
            7  +	'html'; -- default
            8  +	'json';
            9  +	'mkdown';
           10  +	'text';
           11  +	'ansi';
           12  +	'none';
           13  +}
     6     14   
     7     15   m.findheader = terralib.externfunction('mg_http_get_header', {&lib.net.mg_http_message, rawstring} -> &lib.mem.ref(int8)) -- unfortunately necessary to access this function, as its return type conflicts with a function name
     8     16   
     9     17   struct m.header {
    10     18   	key: rawstring
    11     19   	value: rawstring
    12     20   }