httpclient

package
v0.0.0-...-d4e5dbb Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseRequest

func ParseRequest(data string) (*http.Request, error)

ParseRequest 解析原始内容

func SubstitutionVariables

func SubstitutionVariables(data string) string

SubstitutionVariables 替换变量

Types

type LineCategory

type LineCategory int8

LineCategory 当前行类别

const (
	Url    LineCategory = iota // url部分
	Header                     // 头信息部分
	Body                       // body部分
)

type OriginalCategory

type OriginalCategory int8

OriginalCategory 原始字符串类别

const (
	Original OriginalCategory = iota // 原始形式
	EDGE                             // EDGE形式
)

type ResponseWrapper

type ResponseWrapper struct {
	StatusCode int
	Body       string
	Header     http.Header
}

func Get

func Get(url string, timeout int) ResponseWrapper

func PostJson

func PostJson(url string, body string, timeout int) ResponseWrapper

func PostParams

func PostParams(url string, params string, timeout int) ResponseWrapper

func Request

func Request(req *http.Request, timeout int) ResponseWrapper

Jump to

Keyboard shortcuts

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