package main import ( "context" "fmt" "git.diulo.com/mogfee/kit/transport/http" "testing" ) func TestCall(t *testing.T) { var out UserAddRequest path := "/api/v1/answer/listCategory" client := http.Client{} ctx := context.Background() in := UserAddRequest{Name: "tom"} err := client.Invoke(ctx, "POST", path, in, &out) if err != nil { t.Error(err) } fmt.Println(out) }