rexRequest

package
v1.0.87 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestClient

type RequestClient interface {
	GetClient() *http.Client
	Head(url string) (resp *http.Response, err error)
	HeadSync(url string) func() ([]byte, error)
	Get(url string) (resp *http.Response, err error)
	GetSync(url string) func() ([]byte, error)
	Post(url, contentType string, body io.Reader) (resp *http.Response, err error)
	PostSyncJson(url string, sendBody interface{}) func() ([]byte, error)
	PostSyncJsonWithHeaders(url string, sendBody interface{}, headers map[string]string) func() ([]byte, error)
	PostSyncJsonBodyWithHeaders(url string, jsonBody string, headers map[string]string) func() ([]byte, error)
	PostSyncJsonWithFile(url string, fileFieldName, fileName string, file io.Reader, fields map[string]string) func() ([]byte, error)
	Put(url, contentType string, body io.Reader) (resp *http.Response, err error)
	PutSyncJson(url string, sendBody interface{}) func() ([]byte, error)
	Delete(url string) (resp *http.Response, err error)
	DeleteSync(url string) func() ([]byte, error)
}

func NewRequestClient

func NewRequestClient() RequestClient

Jump to

Keyboard shortcuts

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