1
0
mirror of https://github.com/fumiama/NanoBot.git synced 2026-06-10 05:00:24 +08:00

finishi audio & optimize http

This commit is contained in:
源文雨
2023-10-14 13:15:38 +09:00
parent 215cc6ac82
commit 5a088daf11
4 changed files with 85 additions and 125 deletions

View File

@@ -16,6 +16,9 @@ import (
base14 "github.com/fumiama/go-base16384"
)
// HTTPRequsetConstructer ...
type HTTPRequsetConstructer func(ep string, contenttype string, auth string, body io.Reader) (*http.Request, error)
func newHTTPEndpointRequestWithAuth(method, contenttype, ep string, auth string, body io.Reader) (req *http.Request, err error) {
req, err = http.NewRequest(method, OpenAPI+ep, body)
if err != nil {