unit

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MulanPSL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Method

type Method int

请求方式

const (
	MethodGet Method = iota
	MethodPost
)

type Request

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

生成一个新的请求对象 @author fuzeyu

func (*Request) Header

func (this *Request) Header(param url.Values) *Request

设置header头信息

func (*Request) Method

func (this *Request) Method(method Method) *Request

设置请求方式 @param method 请求方式

func (*Request) Request

func (this *Request) Request() (*http.Request, error)

获取request对象

func (*Request) Url

func (this *Request) Url(url string) *Request

设置请求地址 @parma url 请求参数

Jump to

Keyboard shortcuts

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