MCPcopy Create free account
hub / github.com/imroc/req / SetOutputFile

Method SetOutputFile

request.go:554–558  ·  view source on GitHub ↗

SetOutputFile set the file that response Body will be downloaded to.

(file string)

Source from the content-addressed store, hash-verified

552
553// SetOutputFile set the file that response Body will be downloaded to.
554func (r *Request) SetOutputFile(file string) *Request {
555 r.isSaveResponse = true
556 r.outputFile = file
557 return r
558}
559
560// SetOutput set the io.Writer that response Body will be downloaded to.
561func (r *Request) SetOutput(output io.Writer) *Request {

Callers 2

TestSetOutputDirectoryFunction · 0.45
SetOutputFileFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestSetOutputDirectoryFunction · 0.36