Skip to content
This repository was archived by the owner on Jul 12, 2020. It is now read-only.

Conversation

@LPGhatguy
Copy link
Owner

Closes #101.

This PR implements a real version of HttpService:RequestAsync using LuaSocket's socket.http and ltn12 modules.

HttpService can also be constructed using a fake HTTP implementation, which is useful for testing HttpService itself, but may also be useful for consumers of Lemur. Before merging this, perhaps I should also add a configuration option to habitats to disable real HTTP requests or make them cause errors.

Merge checklist:

  • Finish tests
  • Changelog and FEATURES entries
  • Real world test (Rojo integration tests)

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.6%) to 97.195% when pulling 96d4166 on http into 27b17e3 on master.

@LPGhatguy
Copy link
Owner Author

I've talked about this via other channels, but LuaSocket's HTTP won't be enough for this feature. Roblox code can assume that other threads will run while HTTP requests are in-flight, but LuaSocket is synchronous as far as I know.

I prototyped a new, async HTTP interface for Lua over here: https://github.com/LPGhatguy/lua-async-http

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants