httputil

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: UPL-1.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFieldFromResponseBodyOrReturnError

func ExtractFieldFromResponseBodyOrReturnError(responseBody string, field string, errMsg ...string) (string, error)

Helper function to extract field from json response body or returns an error containing input error message

func GetHTTPClientWithRootCA added in v1.7.0

func GetHTTPClientWithRootCA(ca *x509.CertPool) *http.Client

func ValidateResponseCode

func ValidateResponseCode(response *http.Response, validResponseCodes ...int) error

Helper function to validate response code for http response

Types

This section is empty.

Jump to

Keyboard shortcuts

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