Need help with lua-http?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

daurnimator
604 Stars 67 Forks MIT License 1.2K Commits 45 Opened issues

Description

HTTP Library for Lua. Supports HTTP(S) 1.0, 1.1 and 2.0; client and server.

Services available

!
?

Need anything else?

Contributors list

# 23,551
zig
luarock...
luajit
nginx
1117 commits
# 587,661
HTTP
http2
C
Shell
3 commits
# 11,512
moonscr...
jQuery
coffees...
openres...
2 commits
# 47,636
dns-res...
Lua
SQL
thunder
1 commit
# 116,483
Go
dnssec
curio
sed
1 commit
# 8,543
TypeScr...
HTML
Three.j...
Redux
1 commit
# 229,267
Discord
discord...
JavaScr...
discord...
1 commit

HTTP library for Lua.

Features

  • Optionally asynchronous (including DNS lookups and TLS)
  • Supports HTTP(S) version 1.0, 1.1 and 2
  • Functionality for both client and server
  • Cookie Management
  • Websockets
  • Compatible with Lua 5.1, 5.2, 5.3, 5.4 and LuaJIT

Documentation

Can be found at https://daurnimator.github.io/lua-http/

Status

Build Status Coverage Status CII Best Practices

Installation

It's recommended to install lua-http by using luarocks. This will automatically install run-time lua dependencies for you.

$ luarocks install http

Dependencies

To use gzip compression you need one of:

To check cookies against a public suffix list:

If using lua < 5.3 you will need

If using lua 5.1 you will need

For running tests

Development

Getting started

  • Clone the repo:

    $ git clone https://github.com/daurnimator/lua-http.git
    $ cd lua-http
    
  • Install dependencies

    $ luarocks install --only-deps http-scm-0.rockspec
    
  • Lint the code (check for common programming errors)

    $ luacheck .
    
  • Run tests and view coverage report (install tools first)

    $ busted -c
    $ luacov && less luacov.report.out
    
  • Install your local copy:

    $ luarocks make http-scm-0.rockspec
    

Generating documentation

Documentation is written in markdown and intended to be consumed by pandoc. See the

doc/
directory for more information.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.