client

package
v0.0.0-...-0f5f40a Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpClient

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

HttpClient 这是 RAW HTTP 的包装 不建议直接使用 RAW HTTP CLIENT

var Instance *HttpClient

func NewHttpClient

func NewHttpClient(proxy string, timeout time.Duration, debug bool) (*HttpClient, error)

func (*HttpClient) DoReq

func (c *HttpClient) DoReq(req *TheRequest) (*TheResponse, error)

func (*HttpClient) Get

func (c *HttpClient) Get(u string) (*TheResponse, error)

type TheRequest

type TheRequest struct {
	Target         string
	Method         string
	Path           string
	FollowRedirect bool
	Body           string
	Headers        map[string]string
	All            []byte
	// 特殊信息
	IsFromPoC bool
}

func (*TheRequest) Equals

func (r *TheRequest) Equals(req *TheRequest) bool

Equals 判断两个 TheRequest 对象是否完全一致 给 CACHE 功能使用

type TheResponse

type TheResponse struct {
	Code    int
	Headers map[string][]string
	Body    []byte
	All     []byte
}

Jump to

Keyboard shortcuts

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