Compare commits

...

2 Commits

Author SHA1 Message Date
Craftman2868
4545ea3f93
Merge 3e475e2677 into a3e25e3701 2024-06-20 15:37:34 +00:00
Craftman2868
3e475e2677
Add more net/http functions and types
Adding all function and types can be useful in net/http.
2022-07-06 17:33:45 +02:00

View File

@ -583,8 +583,17 @@ func importHumanize() *lua.LTable {
func importHTTP() *lua.LTable {
pkg := L.NewTable()
L.SetField(pkg, "CanonicalHeaderKey", luar.New(L, http.CanonicalHeaderKey))
L.SetField(pkg, "DetectContentType", luar.New(L, http.DetectContentType))
L.SetField(pkg, "StatusText", luar.New(L, http.StatusText))
L.SetField(pkg, "Client", luar.New(L, http.Client))
L.SetField(pkg, "Header", luar.New(L, http.Header))
L.SetField(pkg, "NewRequest", luar.New(L, http.NewRequest))
L.SetField(pkg, "Get", luar.New(L, http.Get))
L.SetField(pkg, "Head", luar.New(L, http.Head))
L.SetField(pkg, "Post", luar.New(L, http.Post))
L.SetField(pkg, "PostForm", luar.New(L, http.PostForm))
L.SetField(pkg, "ReadResponse", luar.New(L, http.ReadResponse))
return pkg
}