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)
| 652 | // the request body, and produces the server's response. See [Pipe.Do] for how |
| 653 | // the HTTP response status is interpreted. |
| 654 | func (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. |