util

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderContentType          = "Content-Type"
	HeaderContentTypeJSON      = "application/json; charset=UTF-8"
	HeaderContentTypeXML       = "application/xml; charset=UTF-8"
	HeaderContentTypeForm      = "application/x-www-form-urlencoded; charset=UTF-8"
	HeaderContentTypeMultipart = "multipart/form-data"
	HeaderContentTypeText      = "text/plain; charset=UTF-8"

	HeaderAccept                 = "Accept"
	HeaderUserAgent              = "User-Agent"
	HeaderReferer                = "Referer"
	HeaderOrigin                 = "Origin"
	HeaderContentEncoding        = "Content-Encoding"
	HeaderContentEncodingGzip    = "gzip"
	HeaderContentEncodingDeflate = "deflate"
)

content type

Variables

This section is empty.

Functions

func AddMultipartFile

func AddMultipartFile(req *http.Request, fieldName, fileName string, file io.ReadCloser) error

func NormalizePath

func NormalizePath(path string) string

func SetBinary

func SetBinary(req *http.Request, body io.Reader) error

func ToMultipart

func ToMultipart(req *http.Request, bodyWriter *multipart.Writer) error

func ToString

func ToString(v interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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