1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-18 23:47:48 +02:00
ferret/pkg/stdlib/io/net/http/post.go

18 lines
416 B
Go
Raw Normal View History

package http
import (
"context"
h "net/http"
"github.com/MontFerret/ferret/pkg/runtime/core"
)
2020-02-21 18:15:41 +02:00
// POST makes a POST request.
// @params params (Object) - request parameters.
// * url (String) - Target url
// * body (Binary) - POST data
// * headers (Object) optional - HTTP headers
func POST(ctx context.Context, args ...core.Value) (core.Value, error) {
return execMethod(ctx, h.MethodPost, args)
}