Post makes an HTTP POST request to url, using 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)
| 807 | // the request body, and produces the server's response. See [Pipe.Do] for how |
| 808 | // the HTTP response status is interpreted. |
| 809 | func (p *Pipe) Post(url string) *Pipe { |
| 810 | req, err := http.NewRequest(http.MethodPost, url, p.Reader) |
| 811 | if err != nil { |
| 812 | return p.WithError(err) |
| 813 | } |
| 814 | return p.Do(req) |
| 815 | } |
| 816 | |
| 817 | // Reject produces only lines that do not contain the string s. |
| 818 | func (p *Pipe) Reject(s string) *Pipe { |