demohttp

package
v1.6.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IndexHttp

type IndexHttp struct {
	ghttp.BaseHttp
}

func (*IndexHttp) CookieAction

func (h *IndexHttp) CookieAction(c *yago.Ctx)

func (*IndexHttp) Hello2Action

func (h *IndexHttp) Hello2Action(c *yago.Ctx)

curl -X GET 'http://127.0.0.1:8080/hello2?name=zhangsan'

func (*IndexHttp) HelloAction

func (h *IndexHttp) HelloAction(c *yago.Ctx)

curl -X GET 'http://127.0.0.1:8080/hello?username=zhangsan'

func (*IndexHttp) IndexAction

func (h *IndexHttp) IndexAction(c *yago.Ctx)

func (*IndexHttp) MetadataAction

func (h *IndexHttp) MetadataAction(c *yago.Ctx)

func (*IndexHttp) NoRouterAction

func (h *IndexHttp) NoRouterAction(c *yago.Ctx)

func (*IndexHttp) UploadAction

func (h *IndexHttp) UploadAction(c *yago.Ctx)

type UserHttp

type UserHttp struct {
	ghttp.BaseHttp
}

func (*UserHttp) AddAction

func (h *UserHttp) AddAction(c *yago.Ctx)

curl 'http://127.0.0.1:8080/demo/user/add' -H "Content-type:application/x-www-form-urlencoded" -XPOST -d "username=lisi&phone=13090001112"

func (*UserHttp) DeleteAction

func (h *UserHttp) DeleteAction(c *yago.Ctx)

curl 'http://127.0.0.1:8080/demo/user/delete' -H "Content-type:application/json" -XPOST -d '{"id":1}'

func (*UserHttp) DetailAction

func (h *UserHttp) DetailAction(c *yago.Ctx)

curl 'http://127.0.0.1:8080/demo/user/detail?id=2' -H "Content-type:application/json" -XGET

func (*UserHttp) ListAction

func (h *UserHttp) ListAction(c *yago.Ctx)

curl 'http://127.0.0.1:8080/user/list' -H "Content-type:application/json" -XPOST -d '{"page_size":10,"page_num":1}'

func (*UserHttp) PlusAction

func (h *UserHttp) PlusAction(c *yago.Ctx)

func (*UserHttp) UpdateAction

func (h *UserHttp) UpdateAction(c *yago.Ctx)

curl 'http://127.0.0.1:8080/demo/user/update' -H "Content-type:application/json" -XPOST -d '{"id":2,"username":"zhangsan"}'

func (*UserHttp) UserDeleteAction

func (h *UserHttp) UserDeleteAction(c *yago.Ctx)

func (*UserHttp) UserGetAction

func (h *UserHttp) UserGetAction(c *yago.Ctx)

func (*UserHttp) UserSetAction

func (h *UserHttp) UserSetAction(c *yago.Ctx)

func (*UserHttp) UserUpdateAction

func (h *UserHttp) UserUpdateAction(c *yago.Ctx)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL