Skip to content

Commit

Permalink
Add body option to http request
Browse files Browse the repository at this point in the history
  • Loading branch information
alicealys committed Jul 7, 2021
1 parent 60acbeb commit 0f9f9d9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/game/scripting/lua/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ namespace scripting::lua
const auto options = va[0].as<sol::table>();

const auto fields = options["parameters"];
const auto body = options["body"];
const auto headers = options["headers"];

if (fields.get_type() == sol::type::table)
Expand All @@ -613,6 +614,11 @@ namespace scripting::lua
}
}

if (body.get_type() == sol::type::string)
{
fields_string = body.get<std::string>();
}

if (headers.get_type() == sol::type::table)
{
const auto _headers = headers.get<sol::table>();
Expand Down

0 comments on commit 0f9f9d9

Please sign in to comment.