http

package
v0.0.0-...-d229e29 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: 0BSD Imports: 5 Imported by: 0

Documentation

Overview

Package http provides an extendable shell API based on http.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotImplemented = errorString("not implemented")
	ErrNotFound       = errorString("not found")
)

Functions

func ResponseError

func ResponseError(resp *http.Response) error

ResponseError converts a http.Response into an error.

Types

type Error

type Error interface {
	error

	WithStatus
}

Error that can be returned to HTTP clients.

type Header = http.Header

type HeaderReader

type HeaderReader interface {
	ReadHeadersHTTP(http.Header)
}

type HeaderWriter

type HeaderWriter interface {
	WriteHeadersHTTP(http.Header)
}

type Method

type Method string

type WithStatus

type WithStatus interface {
	//StatusHTTP should return the HTTP status code
	//relating to this error.
	StatusHTTP() int
}

Jump to

Keyboard shortcuts

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