Source File
options_download.go
Belonging Package
github.com/goforj/httpx
package httpximport// OutputFile streams the response body to a file path.// @group Download Options//// Applies to individual requests only.// Example: download to file//// c := httpx.New()// _ = httpx.Get[string](c, "https://example.com/file", httpx.OutputFile("/tmp/file.bin"))func ( string) OptionBuilder {return OptionBuilder{}.OutputFile()}func ( OptionBuilder) ( string) OptionBuilder {return .add(requestOnly(func( *req.Request) {.SetOutputFile()}))}
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |