util.HttpRequest helper to make requests with headers (#2678)

This commit is contained in:
Alan Hamlett
2023-01-30 10:29:06 +01:00
committed by GitHub
parent f7677549ea
commit 0500cc234d
3 changed files with 16 additions and 0 deletions

View File

@@ -287,6 +287,7 @@ The packages and functions are listed below (in Go type signatures):
- `String(b []byte) string`: converts a byte array to a string.
- `RuneStr(r rune) string`: converts a rune to a string.
- `Unzip(src, dest string) error`: unzips a file to given folder.
- `HttpRequest(method string, url string, headers []string) (http.Response, error)`: makes a http request.
This may seem like a small list of available functions but some of the objects
returned by the functions have many methods. The Lua plugin may access any