http

package
v0.0.0-...-f353867 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2017 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const AUTHN_PROTOCOL = "Rapid7-HMAC-V1-SHA256"
View Source
const (
	// MaxRequestSize is the maximum accepted request size. This is to prevent
	// a denial of service attack where no Content-Length is provided and the server
	// is fed ever more data until it exhausts memory.
	MaxRequestSize = 32 * 1024 * 1024
)

Variables

View Source
var REQUIRED_HEADERS = [3]string{"authorization", "date", "digest"}

Functions

func GetCorrelationId

func GetCorrelationId(rw http.ResponseWriter) string

func Handler

func Handler() error

Handler returns an http.Handler for the API.

Types

type WrappedResponseWriter

type WrappedResponseWriter struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

func NewWrappedResponseWriter

func NewWrappedResponseWriter(rw http.ResponseWriter) *WrappedResponseWriter

func (*WrappedResponseWriter) Header

func (w *WrappedResponseWriter) Header() http.Header

Satisfy the http.ResponseWriter interface

func (*WrappedResponseWriter) Status

func (w *WrappedResponseWriter) Status() int

Give a way to get the status

func (*WrappedResponseWriter) Write

func (w *WrappedResponseWriter) Write(data []byte) (n int, err error)

func (*WrappedResponseWriter) WriteHeader

func (w *WrappedResponseWriter) WriteHeader(statusCode int)

Jump to

Keyboard shortcuts

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