MCPcopy Create free account
hub / github.com/coderabbit214/document-ai / Send

Function Send

pkg/qdrant/common.go:10–27  ·  view source on GitHub ↗
(httpMethod string, suffix string, reqBytes []byte)

Source from the content-addressed store, hash-verified

8)
9
10func Send(httpMethod string, suffix string, reqBytes []byte) (body []byte, err error) {
11 req, err := http.NewRequest(httpMethod, common.GlobalObject.Qdrant.Host+suffix, bytes.NewBuffer(reqBytes))
12 if err != nil {
13 return
14 }
15
16 req.Header.Add("Content-Type", "application/json")
17
18 client := &http.Client{}
19 resp, err := client.Do(req)
20 if err != nil {
21 return
22 }
23 defer resp.Body.Close()
24
25 body, err = io.ReadAll(resp.Body)
26 return
27}
28
29type CommonResponse struct {
30 Result interface{} `json:"result"`

Callers 4

CreatePointsFunction · 0.70
SearchPointsFunction · 0.70
CreateCollectionFunction · 0.70
GetCollectionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected