Documentation
¶
Index ¶
- func Run(opts ...Option) error
- type Config
- type Option
- func WithBody(body string) Option
- func WithDumpReq(dump bool) Option
- func WithHeader(header string) Option
- func WithMethod(method string) Option
- func WithOutput(output string) Option
- func WithShowHeaders(show bool) Option
- func WithTimeout(d time.Duration) Option
- func WithTrace(trace bool) Option
- func WithURL(u string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Method string
Header string
Body string
Timeout time.Duration
ShowHeaders bool
DumpReq bool
Trace bool
Output string
URL string
}
Config holds configuration for the fetch command.
type Option ¶
type Option func(*Config)
Option configures a Config.
func WithDumpReq ¶
func WithHeader ¶
func WithMethod ¶
func WithOutput ¶
func WithShowHeaders ¶
func WithTimeout ¶
Click to show internal directories.
Click to hide internal directories.