terraform-provider-huaweicloud
terraform-provider-huaweicloud copied to clipboard
feat: add `ToFile` support to write the response into a file
What this PR does / why we need it:
Which issue this PR fixes:
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged)
fixes #xxx
Special notes for your reviewer:
Release note:
PR Checklist
- [x] Tests added/passed.
- [ ] Documentation updated.
- [ ] Schema updated.
Example
output_file := w.Get("output_file")
err = httphelper.New(client).
Method("GET").
URI(uri).
Query(params).
MarkerPager("address_groups", "page_info.next_marker", "marker").
ToFile("address_groups", outputFile)