httpreq

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodeIs200

func CodeIs200(code int) error

func Do

func Do[R any](
	client *http.Client,
	method string,
	link string,
	body io.Reader,
	codeChecker CodeChecker,
	extractResult ResultExtractor[R],
) (R, error)

func JSONExtractor

func JSONExtractor[R any](data []byte) (R, error)

func XMLExtractor

func XMLExtractor[R any](data []byte) (R, error)

Types

type CodeChecker

type CodeChecker func(code int) error

type ResultExtractor

type ResultExtractor[R any] func(data []byte) (R, error)

Jump to

Keyboard shortcuts

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