ihttp

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UA = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.3578.98 Safari/537.36"
)

Functions

func AddHandler

func AddHandler(h context.Handler)

func Delete

func Delete(path string, handlers ...context.Handler)

func EnableCrossOrigin

func EnableCrossOrigin()

func Get

func Get(path string, handlers ...context.Handler)

func Handle

func Handle(method string, relativePath string, handlers ...context.Handler)

func HandleDir

func HandleDir(requestPath string, fsOrDir interface{}, opts ...iris.DirOptions) (routes []*router.Route)

func Iris

func Iris() *iris.Application

return the instance

func Post

func Post(path string, handlers ...context.Handler)

func Put

func Put(path string, handlers ...context.Handler)

func Run

func Run(addr string) error

func SetLogLv

func SetLogLv(lv string)

func SetLogOutput

func SetLogOutput(w io.Writer)

Types

type Jar

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

func (*Jar) Cookies

func (jar *Jar) Cookies(u *url.URL) []*http.Cookie

func (*Jar) SetCookies

func (jar *Jar) SetCookies(u *url.URL, cookies []*http.Cookie)

type Req

type Req struct {
	http.Client
	// contains filtered or unexported fields
}

func NewHttpClient

func NewHttpClient(proxyUrl ...string) *Req

func (*Req) DoReq

func (req *Req) DoReq(method string, targetUrl string, callback func(*url.URL, io.Reader))

Jump to

Keyboard shortcuts

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