httprequest

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

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

Go to latest
Published: Mar 16, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	W http.ResponseWriter
	R *http.Request
}

func New

func (Request) CleanUpTmpDir

func (req Request) CleanUpTmpDir(tmpDir string)

Delete the temporary directory created by the `SaveFormFilesToTmp` function.

func (Request) DecodeForm

func (req Request) DecodeForm(dest interface{}) error

Decode the form into the given struct pointer.

func (Request) DecodeFormJSON

func (req Request) DecodeFormJSON(dest interface{}) error

func (Request) Redirect302

func (req Request) Redirect302(URL string)

func (Request) RespondJSON

func (req Request) RespondJSON(obj interface{})

func (Request) SaveFormFileToTmp

func (req Request) SaveFormFileToTmp(key string) (string, string, error)

Save a single file by key.

func (Request) SaveFormFilesToTmp

func (req Request) SaveFormFilesToTmp() (string, []string, error)

Save posted file to a temporary directory and file, returning the directory, to full path to each file, and an error.

Jump to

Keyboard shortcuts

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