tiny-url-ex/root/user/posti.go

33 lines
718 B
Go

package main
import (
"fmt"
e "git.xdrm.io/go/aicra/err"
i "git.xdrm.io/go/aicra/implement"
)
func Get(d i.Arguments, r *i.Response) i.Response {
fmt.Printf("GET /user/post\n")
r.Set("method_test", "Get")
r.Err = e.Upload
return *r
}
func Post(d i.Arguments, r *i.Response) i.Response {
fmt.Printf("POST /user/post\n")
r.Set("method_test", "Post")
r.Err = e.Download
return *r
}
func Put(d i.Arguments, r *i.Response) i.Response {
fmt.Printf("PUT /user/post\n")
r.Set("method_test", "Put")
r.Err = e.MissingDownloadHeaders
return *r
}
func Delete(d i.Arguments, r *i.Response) i.Response {
fmt.Printf("DELETE /user/post\n")
r.Set("method_test", "Delete")
r.Err = e.MissingDownloadBody
return *r
}