MCPcopy Create free account
hub / github.com/aurora-develop/Duck2api / createHeader

Function createHeader

internal/duckgo/request.go:138–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136}
137
138func createHeader() httpclient.AuroraHeaders {
139 header := make(httpclient.AuroraHeaders)
140 header.Set("accept-language", "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7")
141 header.Set("content-type", "application/json")
142 header.Set("origin", "https://duck.ai")
143 header.Set("referer", "https://duck.ai/")
144 header.Set("sec-ch-ua", `"Chromium";v="148", "Google Chrome";v="148", "Not/A)Brand";v="99"`)
145 header.Set("sec-ch-ua-mobile", "?0")
146 header.Set("sec-ch-ua-platform", `"Windows"`)
147 header.Set("sec-fetch-dest", "empty")
148 header.Set("sec-fetch-mode", "cors")
149 header.Set("sec-fetch-site", "same-origin")
150 header.Set("user-agent", UA)
151 return header
152}
153
154func postConversationOnce(client httpclient.AuroraHttpClient, request duckgotypes.ApiRequest, token string) (*http.Response, error) {
155 bodyJSON, err := json.Marshal(request)

Callers 3

postStatusFunction · 0.85
postConversationOnceFunction · 0.85
InitFEVersionFunction · 0.85

Calls 1

SetMethod · 0.80

Tested by

no test coverage detected