1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-01-02 02:57:51 +02:00
ferret/pkg/stdlib/io/net/http/lib.go

18 lines
386 B
Go
Raw Normal View History

package http
import "github.com/MontFerret/ferret/pkg/runtime/core"
// RegisterLib register `HTTP` namespace functions.
func RegisterLib(ns core.Namespace) error {
return ns.
Namespace("HTTP").
RegisterFunctions(
core.NewFunctionsFromMap(map[string]core.Function{
"GET": GET,
"POST": POST,
"PUT": PUT,
"DELETE": DELETE,
"DO": REQUEST,
}))
}