diff options
| author | V1K1NGbg <victor@ilchev.com> | 2024-08-22 23:10:57 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-10-21 13:30:51 -0300 |
| commit | 2b6429ead0c88dc60a1c99743e2c4d92b91fe7ca (patch) | |
| tree | da41a1ef5a7f3aebe581007debc72bb1f9bb03e3 /types/socket | |
| parent | e31ed7ee6be8430272947caf84c41595a3030f5c (diff) | |
| download | luarocks-2b6429ead0c88dc60a1c99743e2c4d92b91fe7ca.tar.gz luarocks-2b6429ead0c88dc60a1c99743e2c4d92b91fe7ca.tar.bz2 luarocks-2b6429ead0c88dc60a1c99743e2c4d92b91fe7ca.zip | |
import type definitions for dependencies from teal-types
Diffstat (limited to 'types/socket')
| -rw-r--r-- | types/socket/http.d.tl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/types/socket/http.d.tl b/types/socket/http.d.tl new file mode 100644 index 00000000..2a64872e --- /dev/null +++ b/types/socket/http.d.tl | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | local ltn12 = require("ltn12") | ||
| 2 | local type Pump = ltn12.Pump | ||
| 3 | local type Sink = ltn12.Sink | ||
| 4 | local type Source = ltn12.Source | ||
| 5 | |||
| 6 | local record http | ||
| 7 | request: function(string): string, integer|string, string, string | ||
| 8 | request: function(string, string): string, integer|string, string, string | ||
| 9 | record HTTPRequest | ||
| 10 | url: string | ||
| 11 | sink: Sink | ||
| 12 | method: string | ||
| 13 | headers: {string:string} | ||
| 14 | source: Source | ||
| 15 | step: Pump | ||
| 16 | proxy: string | ||
| 17 | redirect: boolean | ||
| 18 | create: function | ||
| 19 | end | ||
| 20 | request: function(HTTPRequest): string, integer|string, string, string | ||
| 21 | |||
| 22 | PORT: integer | ||
| 23 | PROXY: string | ||
| 24 | TIMEOUT: integer | ||
| 25 | USERAGENT: string | ||
| 26 | end | ||
| 27 | |||
| 28 | return http \ No newline at end of file | ||
