Пример #1
0
func echo(c *eden.Context) {
	response := new(echoResponse)
	response.Phrase = c.Params.ByName("phrase")
	response.Protocol = c.Request.Proto
	response.RequestURI = c.Request.RequestURI
	response.Requester = c.Request.RemoteAddr
	response.Headers = c.Request.Header
	response.Trailers = c.Request.Trailer

	c.Respond(200, response)
}
Пример #2
0
func status(c *eden.Context) {
	c.Respond(200, eden.DefaultResponse{Status: "OK", Data: "Everything's looking good cap'n"})
}