http

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeadContentType = "content-type"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentType

type ContentType string
const (
	ContentTypeJson ContentType = "application/json"
)

type RestyClient

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

func NewRestyClient

func NewRestyClient(proxyHttpHost ...string) *RestyClient

NewRestyClient 创建一个httpClient对象 proxyHttpHost 可以指定代理 localhost:7890

func (*RestyClient) R

func (c *RestyClient) R() *restyRequest

R GetRequest

func (*RestyClient) SetBaseUrl

func (c *RestyClient) SetBaseUrl(baseUrl string) *RestyClient

func (*RestyClient) SetHeader

func (c *RestyClient) SetHeader(key, value string) *RestyClient

func (*RestyClient) SetHeaders

func (c *RestyClient) SetHeaders(headers map[string]string) *RestyClient

func (*RestyClient) SetTimeout

func (c *RestyClient) SetTimeout(timeout time.Duration) *RestyClient

Jump to

Keyboard shortcuts

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