Skip to content

Async HTTP Requests #2

@bjornbytes

Description

@bjornbytes

Now that LÖVR has support for asynchronous functions with the lovr.task module, it would be nice if lovr-http could integrate with lovr's task system somehow to allow for async requests.

I think all the backends support it. Windows has IOCP, curl has a "multi" interface, the macOS one seems like it's already async, and Java probably has something.

Some options I'm thinking about:

  • Include lovr's headers in this library and use luax_yieldpoll to turn http.request into an async function. Maybe only do this when compiling for lovr.
  • Don't make it an async function, but add some kind of Request object that tracks a request. This is a little less user friendly, but isn't lovr specific.
  • Fold this library into LÖVR? lovr.net module?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions