MCPcopy Create free account
hub / github.com/KikoPlayProject/KikoPlay / header

Method header

Extension/Modules/lua_appnet.cpp:380–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378}
379
380int RequestData::header(lua_State *L)
381{
382 RequestData *d = checkItem(L, 1);
383 if (!d || !d->reply)
384 {
385 lua_pushnil(L);
386 return 1;
387 }
388 const auto &headers = d->reply->rawHeaderPairs();
389 lua_newtable(L); // table
390 for (auto &p : headers)
391 {
392 lua_pushlstring(L, p.first.constData(), p.first.size()); // table key
393 lua_pushlstring(L, p.second.constData(), p.second.size()); // table key value
394 lua_rawset(L, -3); // table
395 }
396 return 1;
397}
398
399int RequestData::content(lua_State *L)
400{

Callers 15

replyFinishedMethod · 0.80
BgmListWindowMethod · 0.80
resizeEventMethod · 0.80
DLNADiscoverMethod · 0.80
setupSearchPageMethod · 0.80
LuaTableViewerMethod · 0.80
AnimeBatchActionMethod · 0.80
AnimeSearchMethod · 0.80
EpisodeEditorMethod · 0.80
SelectTorrentFileMethod · 0.80
PoolManagerMethod · 0.80
initLabelViewMethod · 0.80

Calls 4

lua_pushnilFunction · 0.85
lua_pushlstringFunction · 0.85
lua_rawsetFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected