seekable

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

This package provide a method to read and replace http.Request's body.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoBody = errors.New("no body")
View Source
var ErrTooLargeBody = errors.New("too large body")
View Source
var MaxBodyLength int64 = 16 * 1024 * 1024

Functions

func ReadAll

func ReadAll(req *http.Request) (b []byte, err error)

Types

type SeekableCloser

type SeekableCloser interface {
	Seekabler
	io.Closer
}

func New

func New(req *http.Request) (r SeekableCloser, err error)

type Seekabler

type Seekabler interface {
	Bytes() []byte
	Read(val []byte) (n int, err error)
	SeekToBegin() error
}

Jump to

Keyboard shortcuts

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