MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetLastParameter

Method GetLastParameter

lib/remote/httputility.cpp:41–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41Value HttpUtility::GetLastParameter(const Dictionary::Ptr& params, const String& key)
42{
43 Value varr = params->Get(key);
44
45 if (!varr.IsObjectType<Array>())
46 return varr;
47
48 Array::Ptr arr = varr;
49
50 if (arr->GetLength() == 0)
51 return Empty;
52 else
53 return arr->Get(arr->GetLength() - 1);
54}
55
56/**
57 * Stream a JSON-encoded body to the client.

Callers

nothing calls this directly

Calls 2

GetMethod · 0.45
GetLengthMethod · 0.45

Tested by

no test coverage detected