MCPcopy Create free account
hub / github.com/CPChain/chain / DialHTTP

Function DialHTTP

api/rpc/http.go:86–88  ·  view source on GitHub ↗

DialHTTP creates a new RPC client that connects to an RPC server over HTTP.

(endpoint string)

Source from the content-addressed store, hash-verified

84
85// DialHTTP creates a new RPC client that connects to an RPC server over HTTP.
86func DialHTTP(endpoint string) (*Client, error) {
87 return DialHTTPWithClient(endpoint, new(http.Client))
88}
89
90func (c *Client) sendHTTP(ctx context.Context, op *requestOp, msg interface{}) error {
91 hc := c.writeConn.(*httpConn)

Callers 1

DialContextFunction · 0.85

Calls 1

DialHTTPWithClientFunction · 0.85

Tested by

no test coverage detected