MCPcopy
hub / github.com/bitfield/script / Get

Method Get

script.go:654–660  ·  view source on GitHub ↗

Get makes an HTTP GET request to url, sending the contents of the pipe as the request body, and produces the server's response. See [Pipe.Do] for how the HTTP response status is interpreted.

(url string)

Source from the content-addressed store, hash-verified

652// the request body, and produces the server's response. See [Pipe.Do] for how
653// the HTTP response status is interpreted.
654func (p *Pipe) Get(url string) *Pipe {
655 req, err := http.NewRequest(http.MethodGet, url, p.Reader)
656 if err != nil {
657 return p.WithError(err)
658 }
659 return p.Do(req)
660}
661
662// Hash returns the hex-encoded hash of the entire contents of the
663// pipe based on the provided hasher, or an error.

Callers 3

GetFunction · 0.80
ExamplePipe_GetFunction · 0.80

Calls 2

WithErrorMethod · 0.95
DoMethod · 0.95

Tested by 2

ExamplePipe_GetFunction · 0.64