Path
Request handlers can define dynamic fields within the pattern using {}
syntax.
frz.Route{Pattern: "GET /{name}", Handler: handlers.Hello}
Path fields can then be retrieved with ReceivePath()
.
package handlers
import "github.com/razshare/frizzante/frz"
func Hello(c *frz.Connection) { name := c.ReceivePath("name") // Retrieves field "name". c.SendMessage("Hello " + name) // Sends text.}