http

package
v2.2.21 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MakeRequest is an eitherized version of [http.NewRequest]
	MakeRequest = IOEH.MakeRequest

	// specialize
	MakeGetRequest = IOEH.MakeGetRequest
)

Functions

This section is empty.

Types

type Client

type Client = IOEH.Client

func MakeClient

func MakeClient(httpClient *http.Client) Client

type IOResult

type IOResult[T any] = ioresult.IOResult[T]

type Kleisli

type Kleisli[A, B any] = ioresult.Kleisli[A, B]

func MakeBodyRequest

func MakeBodyRequest(method string, body IOResult[[]byte]) Kleisli[string, *http.Request]

MakeBodyRequest creates a request that carries a body

type Operator

type Operator[A, B any] = ioresult.Operator[A, B]

func ReadAll

func ReadAll(client Client) Operator[*http.Request, []byte]

ReadAll sends a request and reads the response as bytes

func ReadFullResponse

func ReadFullResponse(client Client) Operator[*http.Request, H.FullResponse]

ReadFullResponse sends a request, reads the response as a byte array and represents the result as a tuple

func ReadJSON

func ReadJSON[A any](client Client) Operator[*http.Request, A]

ReadJSON sends a request, reads the response and parses the response as JSON

func ReadText

func ReadText(client Client) Operator[*http.Request, string]

ReadText sends a request, reads the response and represents the response as a text string

type Requester

type Requester = IOEH.Requester

Requester is a reader that constructs a request

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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