http_helper

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: MIT Imports: 14 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxUploadSize = int64(1 * 1024 * 1024) // 1mb in memory

Functions

func DownloadFile

func DownloadFile(url string, filepath string) error

DownloadFile Downloads a file from a url

func GetAuthorizationToken added in v0.0.19

func GetAuthorizationToken(request http.Header) (string, bool)

func GetFormFile added in v0.0.36

func GetFormFile(request *http.Request, fileName string) (io.Reader, error)

func GetHttpRequestBoolValue

func GetHttpRequestBoolValue(r *http.Request, key string, defValue bool) bool

func GetHttpRequestFilterQuery added in v0.0.19

func GetHttpRequestFilterQuery(r *http.Request) (field string, value string)

func GetHttpRequestIntValue

func GetHttpRequestIntValue(r *http.Request, key string) int64

func GetHttpRequestLang

func GetHttpRequestLang(r *http.Request) language.Locale

func GetHttpRequestPaginationQuery added in v0.0.19

func GetHttpRequestPaginationQuery(r *http.Request) (skip int64, top int64, sortField string, sortOrder string)

func GetHttpRequestQueryValue

func GetHttpRequestQueryValue(r *http.Request, key string) (interface{}, error)

func GetHttpRequestStrValue

func GetHttpRequestStrValue(r *http.Request, key string) string

func JoinUrl added in v0.0.34

func JoinUrl(element ...string) string

func MapRequestBody added in v0.0.19

func MapRequestBody(request *http.Request, dest interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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