httputil

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: UPL-1.0 Imports: 4 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 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