http401

package module
v0.0.0-...-8134b96 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: MIT Imports: 3 Imported by: 0

README

go-http401

Package http401 provides tools for creating HTTP 401 responses, for the Go programming language.

Documention

Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-http401

GoDoc

Import

To import package http401 use import code like the following:

import "github.com/reiver/go-http401"

Installation

To install package http401 do the following:

GOPROXY=direct go get github.com/reiver/go-http401

Author

Package http401 was written by Charles Iliya Krempeaux

Documentation

Index

Constants

View Source
const DefaultStatusText string = "Unauthorized"
View Source
const (
	ErrNilHTTPResponseWriter = erorr.Error("http401: nil http-response-writer")
)
View Source
const (
	StatusCode = http.StatusUnauthorized
)

Variables

This section is empty.

Functions

func Serve

func Serve(responseWriter http.ResponseWriter) error

func ServeBytes

func ServeBytes(responseWriter http.ResponseWriter, bytes []byte) error

func ServeString

func ServeString(responseWriter http.ResponseWriter, value string) error

func Unauthorized

func Unauthorized(responseWriter http.ResponseWriter, request *http.Request)

Types

This section is empty.

Jump to

Keyboard shortcuts

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