File: getvalue.ecpp

package info (click to toggle)
tntnet 3.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,488 kB
  • sloc: cpp: 16,636; javascript: 8,109; ansic: 2,189; makefile: 861; sh: 317; xml: 258; perl: 159; sql: 14
file content (14 lines) | stat: -rw-r--r-- 248 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<%include>global.ecpp</%include>
<%cpp>

std::string key = request.getArg("key");

Data::const_iterator it = data.find(key);

if (it == data.end())
    return HTTP_NOT_FOUND;

reply.setContentType("text/plain");
reply.out() << it->second;

</%cpp>