Documentation
¶
Index ¶
- Variables
- func Get(url string, headers ...map[string]string) ([]byte, error)
- func ListenAndServe(listen string, mux *Mux) error
- func Post(url string, data any, headers ...map[string]string) ([]byte, error)
- func Raw(method, url string, data []byte, headers map[string]string) ([]byte, error)
- type Mux
- func (m *Mux) Any(name string, fn func(Request) *response.Response)
- func (m *Mux) Delete(name string, fn func(Request) *response.Response)
- func (m *Mux) Get(name string, fn func(Request) *response.Response)
- func (m *Mux) Post(name string, fn func(Request) *response.Response)
- func (m *Mux) Put(name string, fn func(Request) *response.Response)
- func (m *Mux) RegisterRoute(method, name string, fn func(Request) *response.Response)
- func (m *Mux) Trace(name string)
- type Request
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClient = &http.Client{}
View Source
var DefaultHeader = map[string]string{
"User-Agent": "jk-http-client/1.7.1",
}
Functions ¶
func ListenAndServe ¶ added in v1.9.0
Types ¶
type Mux ¶ added in v1.9.0
type Mux struct {
// contains filtered or unexported fields
}
func (*Mux) RegisterRoute ¶ added in v1.9.0
Click to show internal directories.
Click to hide internal directories.