mark2web/context/fn_request.go

13 lines
320 B
Go
Raw Normal View History

2019-03-18 13:34:52 +01:00
package context
import (
"gitbase.de/apairon/mark2web/helper"
"github.com/flosch/pongo2"
)
// RequestFn will make a web request and returns map[string]interface form pongo2
func RequestFn(url *pongo2.Value, args ...*pongo2.Value) *pongo2.Value {
u := url.String()
return pongo2.AsValue(helper.JSONWebRequest(u))
}