seekable

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: MIT Imports: 5 Imported by: 2

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")

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