blob: 3d03d84856e32d584480ac77e682b5ba2539cff1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
## request
net.request(url, content, header, request)**
net.srequest(url, content, header, request)
both function identically, where srequest uses https instead of http
content is a string with the body of the request
header is just a table
request is just the request method, ie: GET, PUT, ...
will call each other when the url protocol mismatches the function
can return an error
```lua
local response = net.srequest("https://amyy.cc")
```
the response is a table consisting of the response headers with a few extra values
|name|description|
| -- | -- |
| code | response code |
| code-name | response code string |
| version | http version |
| content | a stream containing the body of the request |
|