You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
387 B

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)
}