1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-11-25 22:01:39 +02:00

Added HTTP methods (#452)

* 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
This commit is contained in:
Tim Voronov
2020-02-21 11:06:45 -05:00
committed by GitHub
parent c49045ef56
commit 67dc8703c7
18 changed files with 668 additions and 8 deletions

17
pkg/stdlib/io/net/lib.go Normal file
View File

@@ -0,0 +1,17 @@
package net
import (
"github.com/MontFerret/ferret/pkg/runtime/core"
"github.com/MontFerret/ferret/pkg/stdlib/io/net/http"
)
// RegisterLib register `NET` namespace functions.
func RegisterLib(ns core.Namespace) error {
io := ns.Namespace("NET")
if err := http.RegisterLib(io); err != nil {
return core.Error(err, "register `HTTP`")
}
return nil
}