compose

package
v0.0.0-...-61cd50e Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: Apache-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Getter

type Getter interface {
	Get(url string) string
}

Getter 定义 get 方法

type HTTPClient

type HTTPClient interface {
	Getter
	Poster
	Session(key string, value string) bool
}

HTTPClient 组合了 Get() Post() 方法,也可以定义自己的方法

type HTTPUtil

type HTTPUtil struct {
	// contains filtered or unexported fields
}

HTTPUtil 是 HTTPClient 接口的实现类

func (HTTPUtil) Get

func (http HTTPUtil) Get(url string) string

Get 是 HTTPUtil 中的具体方法实现

func (HTTPUtil) Post

func (http HTTPUtil) Post(url string) string

Post 是 HTTPUtil 中的具体方法实现

func (HTTPUtil) Session

func (http HTTPUtil) Session(key string, value string) bool

Session 是 HTTPUtil 中的具体方法实现

type Poster

type Poster interface {
	Post(url string) string
}

Poster 定义 post 方法

Jump to

Keyboard shortcuts

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