Versions in this module Expand all Collapse all v0 v0.0.1 Dec 20, 2021 Changes in this version + func NewHttpModule(ctx *js.JSEnv) interface + func NewHttpServing() *http_access_log + type HttpModule struct + func (m *HttpModule) CreateServer(jsCallback *js.EcmaObject, isFastCGI bool) (*HttpServer, error) + func (m *HttpModule) Request(options map[string]interface{}, jsCallback *js.EcmaObject) (*reqResult, error) + type HttpServer struct + func CreateHttpServer(jsCallback *js.EcmaObject, isFastCGI bool) *HttpServer + func (s *HttpServer) Close() + func (s *HttpServer) Listen(port int, hostname string) error + type JSRequest struct + Auth string + Hash string + Headers map[string][]string + Host string + HttpVersion string + Method string + Path string + RawQuery string + RemoteAddr string + Uri string + func (req *JSRequest) GetLocalTime() string + func (req *JSRequest) Param(key string) string + func (req *JSRequest) ParseParams() (map[string][]string, error) + func (req *JSRequest) ReadBody() ([]byte, error) + type JSResponse struct + func (resp *JSResponse) End(data []byte, encoding string) + func (resp *JSResponse) SetHeader(key string, value interface{}) + func (resp *JSResponse) Write(chunk []byte, encoding string) + func (resp *JSResponse) WriteHead(statusCode int, headers map[string]interface{})