MCPcopy Create free account
hub / github.com/UiPath/uipathcli / writeInputBody

Method writeInputBody

executor/http_executor.go:192–207  ·  view source on GitHub ↗
(bodyWriter *io.PipeWriter, input stream.Stream, cancel context.CancelCauseFunc)

Source from the content-addressed store, hash-verified

190}
191
192func (e HttpExecutor) writeInputBody(bodyWriter *io.PipeWriter, input stream.Stream, cancel context.CancelCauseFunc) {
193 go func() {
194 defer func() { _ = bodyWriter.Close() }()
195 data, err := input.Data()
196 if err != nil {
197 cancel(err)
198 return
199 }
200 defer func() { _ = data.Close() }()
201 _, err = io.Copy(bodyWriter, data)
202 if err != nil {
203 cancel(err)
204 return
205 }
206 }()
207}
208
209func (e HttpExecutor) writeUrlEncodedBody(bodyWriter *io.PipeWriter, parameters []ExecutionParameter, cancel context.CancelCauseFunc) {
210 go func() {

Callers 1

writeBodyMethod · 0.95

Calls 2

CloseMethod · 0.80
DataMethod · 0.65

Tested by

no test coverage detected