httpx

package
v1.14.0-dev.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BodyTypeMap = map[string]string{"none": "", "text": "text/plain", "json": "application/json", "html": "text/html", "xml": "application/xml", "javascript": "application/javascript", "form": ""}

Functions

func DownloadFile

func DownloadFile(filepath string, uri string) error

func IsHttpUrl

func IsHttpUrl(str string) error

func IsValidUrl

func IsValidUrl(uri string) bool

func ReadFile

func ReadFile(uri string) (io.ReadCloser, error)

ReadFile Need to close the return reader

func Send

func Send(logger api.Logger, client *http.Client, bodyType string, method string, u string, headers map[string]string, sendSingle bool, v interface{}) (*http.Response, error)

Send v must be a []byte or map

Types

This section is empty.

Jump to

Keyboard shortcuts

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