aboutsummaryrefslogtreecommitdiff
path: root/docs/net/request.md
diff options
context:
space:
mode:
authorame <[email protected]>2025-06-17 00:25:14 -0500
committerame <[email protected]>2025-06-17 00:25:14 -0500
commite058a29d70dd299b7fc2a84cae5824fd03fbef84 (patch)
treecf7d7937d04f49a02e1092541f6ab5c53e853b12 /docs/net/request.md
parentc98308b44764483322df9c4cf6ec9187669a5f00 (diff)
more docs
Diffstat (limited to 'docs/net/request.md')
-rw-r--r--docs/net/request.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/net/request.md b/docs/net/request.md
new file mode 100644
index 0000000..3d03d84
--- /dev/null
+++ b/docs/net/request.md
@@ -0,0 +1,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 |