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

Method Post

script.go:809–815  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

807// the request body, and produces the server's response. See [Pipe.Do] for how
808// the HTTP response status is interpreted.
809func (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.
818func (p *Pipe) Reject(s string) *Pipe {

Callers 3

PostFunction · 0.80
ExamplePipe_PostFunction · 0.80

Calls 2

WithErrorMethod · 0.95
DoMethod · 0.95

Tested by 2

ExamplePipe_PostFunction · 0.64