MCPcopy Create free account
hub / github.com/cutelyst/cutelyst / checkResponse

Method checkResponse

tests/testvalidator.cpp:1215–1222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1213 ValidatorMessages(nullptr, "invalid", "parsingerror", "validationdataerror");
1214
1215 void checkResponse(Context *c, const ValidatorResult &r)
1216 {
1217 if (r) {
1218 c->response()->setBody("valid"_ba);
1219 } else {
1220 c->response()->setBody(r.errorStrings().constFirst());
1221 }
1222 }
1223};
1224
1225void TestValidator::initTestCase()

Callers

nothing calls this directly

Calls 3

responseMethod · 0.80
errorStringsMethod · 0.80
setBodyMethod · 0.60

Tested by

no test coverage detected