(bodyWriter *io.PipeWriter, parameters []ExecutionParameter, cancel context.CancelCauseFunc)
| 175 | } |
| 176 | |
| 177 | func (e HttpExecutor) writeMultipartBody(bodyWriter *io.PipeWriter, parameters []ExecutionParameter, cancel context.CancelCauseFunc) (string, int64) { |
| 178 | multipartSize := e.calculateMultipartSize(parameters) |
| 179 | formWriter := multipart.NewWriter(bodyWriter) |
| 180 | go func() { |
| 181 | defer func() { _ = bodyWriter.Close() }() |
| 182 | defer func() { _ = formWriter.Close() }() |
| 183 | err := e.writeMultipartForm(formWriter, parameters) |
| 184 | if err != nil { |
| 185 | cancel(err) |
| 186 | return |
| 187 | } |
| 188 | }() |
| 189 | return formWriter.FormDataContentType(), multipartSize |
| 190 | } |
| 191 | |
| 192 | func (e HttpExecutor) writeInputBody(bodyWriter *io.PipeWriter, input stream.Stream, cancel context.CancelCauseFunc) { |
| 193 | go func() { |
no test coverage detected