utils

package
v0.0.0-...-305f2c3 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2018 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromIP

func FromIP(req *http.Request) string

FromIP makes a best effort to compute the request client IP.

func HTTPGet

func HTTPGet(URL string) ([]byte, error)

HTTPGet do http GET method

func IPIsLocal

func IPIsLocal(remoteIP, localIP string) bool

IPIsLocal check ip address is local ip or not

func IsFromLocalIP

func IsFromLocalIP(req *http.Request) bool

IsFromLocalIP check req is from local or not

func PostBuffer2URL

func PostBuffer2URL(buffer []byte, url string) ([]byte, error)

PostBuffer2URL do URL post

func PostURI2URL

func PostURI2URL(uris map[string]string, url string) ([]byte, string, error)

PostURI2URL post URI as ?a=12&b=44 to URL return: result byte, uri combined result, connect or post error

Types

This section is empty.

Jump to

Keyboard shortcuts

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