httputil

package
v12.20.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package httputil provides methods for working with HTTP request/responses

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDescByCode

func GetDescByCode(code int) string

GetDescByCode returns response code description

func GetRemoteAddr

func GetRemoteAddr(r *http.Request) (string, string)

GetRemoteAddr returns network address that sent the request

func GetRemoteHost

func GetRemoteHost(r *http.Request) string

GetRemoteHost returns host that sent the request

func GetRemotePort

func GetRemotePort(r *http.Request) string

GetRemotePort returns port of the host that sent the request

func GetRequestAddr

func GetRequestAddr(r *http.Request) (string, string)

GetRequestAddr returns host and port info from request

func GetRequestHost

func GetRequestHost(r *http.Request) string

GetRequestHost returns host from request struct

func GetRequestPort

func GetRequestPort(r *http.Request) string

GetRequestPort returns port from request struct

func IsURL

func IsURL(url string) bool

IsURL check if given value is valid URL or not

Types

This section is empty.

Jump to

Keyboard shortcuts

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