SIRI_API_RT_NONE,
SIRI_API_RT_QUERY,
SIRI_API_RT_INSERT,
+ SIRI_APT_RT_SERVICE,
} siri_api_req_t;
typedef enum
uv_stream_t * stream;
siri_api_content_t content_type;
siri_api_req_t request_type;
+ service_request_t service_type;
http_parser parser;
uv_write_t req;
};
#define API__ICMP_WITH(__s, __n, __w) \
(__n == strlen(__w) && strncasecmp(__s, __w, __n) == 0)
+#define API__CMP_WITH(__s, __n, __w) \
+ (__n == strlen(__w) && strncmp(__s, __w, __n) == 0)
+
static const char api__content_type[3][20] = {
"text/plain",
"application/json",
ar->request_type = SIRI_API_RT_INSERT;
api__get_siridb(ar, at, n);
}
+ else if (API__CMP_WITH(at, n, "/new-account"))
+ {
+ ar->request_type = SIRI_API_RT_INSERT;
+ }
return 0;
}