Skip to content

chiahan1123/zopsdk-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

中通开放平台SDK(Go版)

参考

中通开放平台SDK

使用方式

go get -u github.com/chiahan1123/zopsdk-go

Form

client, err := zop.NewClient("kfpttestCode", "kfpttestkey==")
if err != nil {
	// handle error
	return
}
params := make(map[string]string)
params["request"] = `[{"partnerCode":"360844819234","companyCode":"GP1551922487","reason":"客户取消"}]`
resp, err := client.Execute(context.Background(), &zop.Request{
    URL:    "https://japi-test.zto.com/cancelOrder",
    Params: params,
})
if err != nil {
	// handle error
	return
}
fmt.Println(resp)

JSON

client, err := zop.NewClient("kfpttestCode", "kfpttestkey==")
if err != nil {
	// handle error
	return
}
resp, err := client.Execute(context.Background(), &zop.Request{
    URL:  "https://japi-test.zto.com/cancelOrder",
    Body: `{"request":[{"partnerCode":"360844819234","companyCode":"GP1551922487","reason":"客户取消"}]}`,
})
if err != nil {
	// handle error
	return
}
fmt.Println(resp)

About

中通开放平台SDK(Go)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages