Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) Do(method, url, data string, header map[string]string) (res *http.Response, err error)
- func (c *Client) Form(url string, frm map[string][]string) (*http.Response, error)
- func (c *Client) Get(url string) (*http.Response, error)
- func (c *Client) Head(url string) (*http.Response, error)
- func (c *Client) Post(url, contentType, data string) (*http.Response, error)
- type Ctx
- func (c *Ctx) Body() (*gabs.Container, error)
- func (c *Ctx) Header(name string) string
- func (c *Ctx) Method() string
- func (c *Ctx) Query(name string) string
- func (c *Ctx) SendFile(path string) error
- func (c *Ctx) SendJson(data *gabs.Container)
- func (c *Ctx) SendString(data string)
- func (c *Ctx) SetHeader(name, value string)
- func (c *Ctx) SetStatus(code int)
- func (c *Ctx) Vars(name string) string
- type Server
- func (s *Server) Connect(path string, fn func(ctx *Ctx))
- func (s *Server) Delete(path string, fn func(ctx *Ctx))
- func (s *Server) File(path, prefix, dir string)
- func (s *Server) Get(path string, fn func(ctx *Ctx))
- func (s *Server) Head(path string, fn func(ctx *Ctx))
- func (s *Server) Options(path string, fn func(ctx *Ctx))
- func (s *Server) Patch(path string, fn func(ctx *Ctx))
- func (s *Server) Post(path string, fn func(ctx *Ctx))
- func (s *Server) Put(path string, fn func(ctx *Ctx))
- func (s *Server) Route(path string, fn func(ctx *Ctx))
- func (s *Server) Running() bool
- func (s *Server) Start(cors bool, allowHeader []string, allowedMethods []string, ...)
- func (s *Server) Stop(n time.Duration) (error, context.CancelFunc)
- func (s *Server) Trace(path string, fn func(ctx *Ctx))
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CtxType Type ServerType Type ResType Type ClientType Type HttpModule Module ServerPool map[int64]*Server ClientPool map[int64]*Client )
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.