Пример #1
0
//curl 'localhost:8083/Api_name/Get?fd=123'
func (this *Api_nameREST) Get(c *hera.Context) error {
	params := c.Params
	var data string = ""
	for p_key, p_value := range params {
		if "1" == p_value {
			return c.Error("key has error", 1001, 400)
		} else {
			data += "key[" + p_key + "]=" + p_value + " " + hera.SERVER["LOG_PATH"]
		}
	}

	hera.Logger.Info("have sucess vistited Hello::Get() interface")
	return c.Success("access-data:" + data)
}
Пример #2
0
func (this *ApiREST) GetHello(c *hera.Context) error {
	return c.Success("Hello")
}