vhttp

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	C = NewClient().SetTimeout(5 * time.Second)

	HttpClient = NewClient().
				SetRetryCount(0).
				SetTimeout(5 * time.Second).
				SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})

	HttpClientRetry = NewClient().
					SetRetryCount(3).
					SetTimeout(5 * time.Second).
					SetTLSClientConfig(&tls.Config{InsecureSkipVerify: true})
)

Functions

func NewClient

func NewClient() *resty.Client

NewClient method creates a new Resty client.

func NewServer

func NewServer(lifecycle vfx.Lifecycle, s *Server) *vapi.Engine

NewServer new server

Types

type Request

type Request = resty.Request

type Response

type Response = resty.Response

type Server

type Server struct {
	Addr        string
	G           *vapi.Engine
	StopHandler func()
}

func (*Server) NewServer

func (s *Server) NewServer(lifecycle vfx.Lifecycle) *vapi.Engine

NewServer new server

Jump to

Keyboard shortcuts

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