mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-21 13:42:15 +08:00
13 lines
314 B
JavaScript
13 lines
314 B
JavaScript
|
Http = {
|
||
|
onrcv: function(c, req) {
|
||
|
if (req.uri === '/data/js') {
|
||
|
// Send reply. We need to construct everything, headers and body
|
||
|
mg_send(c, 'HTTP/1.0 200 OK\r\n\r\n');
|
||
|
mg_send(c, JSON.stringify(req));
|
||
|
|
||
|
// Let Mongoose know we've handled the connection
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
}
|