httpx

package
v0.0.0-...-b957f84 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorStatusNot200 error type
	ErrorStatusNot200 = errors.New("error: HTTP Response code not 200")
)

Functions

func HTTPGet

func HTTPGet(url string, headers map[string]string, timeout int) (*http.Response, error)

HTTPGet will execute HTTP GET

func HTTPPost

func HTTPPost(url string, body io.Reader, headers map[string]string, timeout int) (*http.Response, error)

HTTPPost will execute HTTP POST

func HTTPRequest

func HTTPRequest(req *http.Request, timeout int) (*http.Response, error)

HTTPRequest will executes HTTP request and returns the http.Response. Any errors or non-200 status code result in an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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