MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / getParam

Method getParam

plugins/plugin_utils/plugin_HTTP.cpp:111–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111bool HTTPRequest::getParam(const char* param, std::string& val) const {
112 val = "";
113 if (!param) {
114 return false;
115 }
116
117 std::string p;
118 tolower(param, p);
119
120 std::map<std::string, std::vector<std::string> >::const_iterator itr = parameters.find(p);
121 if (itr != parameters.end()) {
122 if (itr->second.size()) {
123 val = itr->second[itr->second.size() - 1];
124 }
125 return true;
126 }
127 return false;
128}
129
130bool HTTPRequest::getParam(const std::string& param, std::string& val) const {
131 val = "";

Callers 8

handleRequestMethod · 0.45
handleAuthedRequestMethod · 0.45
verifyTokenMethod · 0.45
generatePageMethod · 0.45
newPageMethod · 0.45
processMethod · 0.45
newPageMethod · 0.45
handleAuthedRequestMethod · 0.45

Calls 5

tolowerFunction · 0.85
findMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected