jhttp

package module
v0.0.0-...-6f87e30 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(url string) (string, error)

func Post

func Post(url string, t string, d string) (string, error)

func PostJson

func PostJson(url string, d string) (string, error)

func WebService11

func WebService11(url string, body string) (string, error)

func WebService12

func WebService12(url string, body string) (string, error)

Types

type Http

type Http struct {
	Client  *http.Client
	Error   string
	Request *http.Request
	IsOk    bool
}

func Create

func Create(url string, secondtimeout int, way string) *Http

func CreateGet

func CreateGet(url string, secondtimeout int) *Http

func CreatePOST

func CreatePOST(url string, secondtimeout int) *Http

func New

func New(url string, secondtimeout int, way string) *Http

func (*Http) AddCookie

func (h *Http) AddCookie(name string, value string, path string, domain string) *Http

func (*Http) Do

func (h *Http) Do() (string, error)

func (*Http) DoWithResp

func (h *Http) DoWithResp() (*HttpResp, error)

func (*Http) DoWithoutBody

func (h *Http) DoWithoutBody() error

func (*Http) SetHeader

func (h *Http) SetHeader(name string, value string) *Http

type HttpResp

type HttpResp struct {
	Response *http.Response
}

func (*HttpResp) Close

func (h *HttpResp) Close()

func (*HttpResp) GetCookie

func (h *HttpResp) GetCookie(name string) string

type HttpUA

type HttpUA struct {
	SysName []string
}

func NewUA

func NewUA() *HttpUA

func (*HttpUA) AddAgentSysName

func (h *HttpUA) AddAgentSysName(str string)

func (*HttpUA) RandChromeSysNameAndVerUA

func (h *HttpUA) RandChromeSysNameAndVerUA() string

func (*HttpUA) RandChromeVerUA

func (h *HttpUA) RandChromeVerUA() string

func (*HttpUA) RandEdgeSysNameAndVerUA

func (h *HttpUA) RandEdgeSysNameAndVerUA() string

func (*HttpUA) RandEdgeVerUA

func (h *HttpUA) RandEdgeVerUA() string

Jump to

Keyboard shortcuts

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