httpx

package
v2.4.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 18 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": "application/x-www-form-urlencoded;param=value"}

Functions

func DownloadFile

func DownloadFile(folder string, name string, uri string) (string, error)

func GetSSRFDialContext

func GetSSRFDialContext(timeout time.Duration) func(ctx context.Context, network, addr string) (net.Conn, 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, v any) (*http.Response, error)

Send v must be a []byte or map

func SendWithFormData added in v2.2.0

func SendWithFormData(logger api.Logger, client *http.Client, bodyType string, method string, u string, headers map[string]string, formData map[string]string, formFieldName string, v any) (*http.Response, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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