msg

package
v0.0.0-...-3d9cc79 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Generic HTTP responses that aren't specific to any particular type of request

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyToBody

func CopyToBody(client io.Writer, bodyReader io.Reader)

func RespondWithAllowHeader

func RespondWithAllowHeader(client io.Writer, status Status, allowedMethods []string)

func WriteBody

func WriteBody(client io.Writer, body string)

func WriteContentLengthHeader

func WriteContentLengthHeader(client io.Writer, numBytes int)

func WriteContentTypeHeader

func WriteContentTypeHeader(client io.Writer, value string)

func WriteEndOfMessageHeader

func WriteEndOfMessageHeader(client io.Writer)

func WriteHeader

func WriteHeader(client io.Writer, name string, value string)

func WriteStatus

func WriteStatus(client io.Writer, status Status)

Types

type Status

type Status struct {
	Code   uint
	Reason string
}

Directories

Path Synopsis
HTTP 4xx Client Error responses from RFC 7231, Section 6.5
HTTP 4xx Client Error responses from RFC 7231, Section 6.5
HTTP 5xx Server Error responses from RFC 7231, Section 6.6
HTTP 5xx Server Error responses from RFC 7231, Section 6.6
HTTP 2xx Successful responses from RFC 7231, Section 6.3
HTTP 2xx Successful responses from RFC 7231, Section 6.3

Jump to

Keyboard shortcuts

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