ai-week/udesk/geturl.go

18 lines
589 B
Go
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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