1
This commit is contained in:
parent
e21d2e3b5d
commit
877ac12ec2
12
sysutils.go
12
sysutils.go
@ -46,12 +46,16 @@ func Request(r *http.Request, name string) *XValue {
|
||||
return NewXString("")
|
||||
}
|
||||
|
||||
func ResponseOk(w http.ResponseWriter) {
|
||||
w.Write([]byte(`{"errcode":0, "errmsg":""}`))
|
||||
func Response(w* http.ResponseWriter, data string) {
|
||||
(*w).Write([]byte(data))
|
||||
}
|
||||
|
||||
func ResponseInt32Ok(w http.ResponseWriter, key string, val int32) {
|
||||
w.Write([]byte(fmt.Sprintf(`{"errcode":0, "errmsg":"", "%s":%d}`, key, val)))
|
||||
func ResponseOk(w* http.ResponseWriter) {
|
||||
(*w).Write([]byte(`{"errcode":0, "errmsg":""}`))
|
||||
}
|
||||
|
||||
func ResponseInt32Ok(w* http.ResponseWriter, key string, val int32) {
|
||||
(*w).Write([]byte(fmt.Sprintf(`{"errcode":0, "errmsg":"", "%s":%d}`, key, val)))
|
||||
}
|
||||
|
||||
func GetPostBody(r *http.Request) *XValue {
|
||||
|
Loading…
x
Reference in New Issue
Block a user