httputil

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAgent                = "initiat-cli/1.0"
	MaxResponsePreviewLength = 200
)

Variables

This section is empty.

Functions

func DoSignedRequest

func DoSignedRequest(client *http.Client, method, url string, body []byte) (int, []byte, error)

func DoUnsignedRequest

func DoUnsignedRequest(client *http.Client, method, url string, body []byte) (int, []byte, error)

func HandleDeleteResponse

func HandleDeleteResponse(statusCode int, body []byte) error

func HandleGetResponse

func HandleGetResponse(statusCode int, body []byte, target interface{}) error

func HandleStandardResponse

func HandleStandardResponse(statusCode int, body []byte, target interface{}) error

func ParseAPIResponse

func ParseAPIResponse(body []byte, target interface{}) error

func ParseValidationErrorResponse

func ParseValidationErrorResponse(body []byte) error

func SetCommonHeaders

func SetCommonHeaders(req *http.Request, contentType string)

func SignRequest

func SignRequest(req *http.Request, _ []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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