# How to use Lua language packages in a runtime module?

**URL:** <https://forum.heroiclabs.com/t/how-to-use-lua-language-packages-in-a-runtime-module/2678>\
**Category:** Runtime Framework\
**Tags:** lua\
**Created:** [May 29, 2022, 11:41am UTC](https://forum.heroiclabs.com/t/how-to-use-lua-language-packages-in-a-runtime-module/2678 "2022-05-29T11:41:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amuuu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/amuuu/32/1048_2.png) [@amuuu](https://forum.heroiclabs.com/u/amuuu)\
**Post date:** [May 29, 2022, 11:41am UTC](https://forum.heroiclabs.com/t/how-to-use-lua-language-packages-in-a-runtime-module/2678/1 "2022-05-29T11:41:26Z")

</div>

Hello!  
I have a small question: Is there a way to add Lua language packages and use them in runtime modules? Specifically, I want to use Lua’s `socket.http` package to send POST and GET requests to another server. Like, I want to be able to use the `require` keyword and use packages.

I tried to use it normally and it got errors; like this:

```auto
local http = require("socket.http")

```

Thank you!

---

<div class="post-metadata">

**Author:** ![yamlcoder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/yamlcoder/32/970_2.png) [@yamlcoder](https://forum.heroiclabs.com/u/yamlcoder)\
**Post date:** [May 30, 2022, 11:48am UTC](https://forum.heroiclabs.com/t/how-to-use-lua-language-packages-in-a-runtime-module/2678/2 "2022-05-30T11:48:03Z")

</div>

Hi amuuu,

In general you can bundle any pure Lua module compatible with Lua 5.1 . If bundled module relies on C extension it can’t be used due to sandboxing restrictions.

Regarding HTTP request to another server, there is builtin `http_server` function already available to you. See docs:

- [Nakama: Lua | Heroic Labs Documentation](https://heroiclabs.com/docs/nakama/server-framework/function-reference/lua/#http_request)
