request

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package request provides functions for making HTTP requests and unmarshaling the response body into a struct.

Index

Constants

This section is empty.

Variables

View Source
var ErrNonRetryableCode = fmt.Errorf("the return was not of status 200")

ErrNonRetryableCode is returned when the response status code is not 200 and is not retryable.

View Source
var ErrRetryableCode = fmt.Errorf("the return was not of status 200")

ErrRetryableCode is returned when the response status code is not 200 and is retryable.

Functions

func Request

func Request[U any](endpoint string, unmarshal *U) (err error)

Request sends a GET request to the specified endpoint and unmarshals the response body into the provided struct.

Types

This section is empty.

Jump to

Keyboard shortcuts

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