netutil

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

netutil

2019年12月8日 星期日

Joshua Conero

网络助手

HttpUtil

http util,内部命令空间实例 Httpu

Documentation

Overview

Package netutil net util

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PortAddress added in v1.5.0

func PortAddress(port any) string

PortAddress turn string port as addr for net.Listen

8080 -> :8080

func PortAvailable added in v1.5.0

func PortAvailable(port uint16) uint16

PortAvailable check if port is available that next port can be used

Types

type HttpUtil

type HttpUtil struct {
}

HttpUtil http util tool

var Httpu HttpUtil

func (HttpUtil) PostForm

func (hu HttpUtil) PostForm(rUrl string, files map[string]string, data map[string]string) (*http.Response, error)

PostForm post file and form data. support multi files or data

func (HttpUtil) PostFormString

func (hu HttpUtil) PostFormString(rUrl string, files map[string]string, data map[string]string) string

PostFormString postForm post add the directly by string content

Jump to

Keyboard shortcuts

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