feat: Bytearray request body support

This commit is contained in:
MihailRis 2026-09-14 19:51:05 +03:00
parent 762634ea04
commit dad67db835

View file

@ -102,7 +102,11 @@ static int l_request(lua::State* L, network::Network& network) {
lua::pop(L);
}
if (lua::getfield(L, "body", 2)) {
request.body = lua::require_lstring(L, -1);
if (lua::type(L, -1) == LUA_TCDATA) {
request.body = lua::bytearray_as_string(L, -1);
} else {
request.body = lua::require_lstring(L, -1);
}
lua::pop(L);
}
if (lua::getfield(L, "follow_location", 2)) {