ai-week/udesk/geturl.go

18 lines
589 B
Go
Raw Normal View History

2024-05-01 20:03:20 +08:00
package udesk
import "strings"
//最终请求的url后缀拼接
func Geturlstring(url string) string {
var authobj = u.getAuthobj() //必须要同步处理timestamp和sign的关系否则会鉴权失败所以从同一个结构体中取值
var builder strings.Builder
builder.WriteString(url)
builder.WriteString("email=" + authobj.Email)
builder.WriteString("&timestamp=" + authobj.Timestamp)
builder.WriteString("&sign=" + authobj.Sign)
builder.WriteString("&nonce=" + authobj.Nonce)
builder.WriteString("&sign_version=" + authobj.Sign_version)
return builder.String()
}