mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-18 23:47:48 +02:00
67dc8703c7
* Added HTTP methods * Added unit tests * Fixed linting issue * Replaced localhost with 127.0.0.1 * Added random port generator * Disabled http tests * Disabled HTTP GET test
18 lines
386 B
Go
18 lines
386 B
Go
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,
|
|
}))
|
|
}
|