Skip to content

Can't call Ctx.Exec in mvc #1141

@zheeeng

Description

@zheeeng

I can trigger GetTest and GetTest2 by visiting routes directly, but the Exec seems no effects.

func (c *controller) GetTest() interface{} {
	println("get test")
	c.Ctx.Exec("GET", "/api/v1/example/test2")
	return iris.StatusNoContent
}

func (c *controller) GetTest2() interface{} {
	println("get test2")
	return iris.StatusCreated
}

One more question, can we distinguish the visitor is come from between by outside internet visiting and by inside handler calling?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions