Skip to content

Instantly share code, notes, and snippets.

@owensd
Last active April 21, 2017 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save owensd/1b16e3c12b07cd4c993cb9da06a507a3 to your computer and use it in GitHub Desktop.
Save owensd/1b16e3c12b07cd4c993cb9da06a507a3 to your computer and use it in GitHub Desktop.
auto nameit = req.parameters.find("name");
if (nameit == req.parameters.end()) {
// parameter not found
}
else {
// yay, get the name out!
auto name = nameit->first;
}
if (req.parameters.count("name") == 1) {
// there is an item here
}
else {
// there is not
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment