1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-10 07:42:27 +08:00

feat: net.go, add IsInternalIP, GetRequestPublicIp, EncodeUrl

This commit is contained in:
dudaodong
2022-07-27 15:18:20 +08:00
parent 0cb251f7b8
commit 116ff284c3
3 changed files with 62 additions and 5 deletions

View File

@@ -6,8 +6,8 @@
// HttpGet, HttpPost, HttpDelete, HttpPut, HttpPatch, function param `url` is required.
// HttpGet, HttpPost, HttpDelete, HttpPut, HttpPatch, function param `params` is variable, the order is:
// params[0] is header which type should be http.Header or map[string]string,
// params[1] is query param which type should be url.Values or map[string]interface{}, when content-type header is
// multipart/form-data or application/x-www-form-urlencoded must pass url.Values params
// params[1] is query string param which type should be url.Values or map[string]string, when content-type header is
// multipart/form-data or application/x-www-form-urlencoded
// params[2] is post body which type should be []byte.
// params[3] is http client which type should be http.Client.
package netutil