http

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(url, pattern string) (string, error)

Get is requests RESTful API then returns the response parsed value.

func GetFile

func GetFile(url, dest string) error

GetFile downloads a web file.

func PickFile

func PickFile(url string, opts ...Option) error

PickFile downloads a web file and unpack, pick files.

Types

type Option

type Option func(*option)

Option represents unpack, pick files option.

func WithDir

func WithDir(dir string) Option

WithDir represents downloads file local location option. Default dest is current directory('.').

func WithPick

func WithPick(files []string) Option

WithPick represents downloads file inner pick option.

func WithPickRename

func WithPickRename(pick map[string]string) Option

WithPickRename represents downloads file inner pick and rename option.

func WithRename

func WithRename(rename string) Option

WithRename represents downloads file local rename option.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL