MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / callHostHTTPDo

Method callHostHTTPDo

internal/pluginhost/host_callbacks.go:142–153  ·  view source on GitHub ↗
(ctx context.Context, request []byte)

Source from the content-addressed store, hash-verified

140}
141
142func (h *Host) callHostHTTPDo(ctx context.Context, request []byte) ([]byte, error) {
143 httpReq, callbackID, errDecode := decodeHostHTTPRequestWithCallbackID(request)
144 if errDecode != nil {
145 return nil, errDecode
146 }
147 ctx = h.resolveCallbackContext(callbackID, ctx)
148 resp, errDo := h.newHTTPClient(nil).Do(ctx, httpReq)
149 if errDo != nil {
150 return nil, errDo
151 }
152 return marshalRPCResult(resp)
153}
154
155func (h *Host) callHostHTTPDoStream(ctx context.Context, request []byte) ([]byte, error) {
156 httpReq, callbackID, errDecode := decodeHostHTTPRequestWithCallbackID(request)

Callers 1

callFromPluginMethod · 0.95

Calls 5

newHTTPClientMethod · 0.95
marshalRPCResultFunction · 0.85
DoMethod · 0.65

Tested by

no test coverage detected