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

fix: fix http post to support multipart/form-data header

This commit is contained in:
dudaodong
2022-04-14 11:48:39 +08:00
parent c960841491
commit b4cd0750e4
3 changed files with 33 additions and 2 deletions

View File

@@ -6,7 +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]any,
// params[1] is query param which type should be url.Values or map[string]any, when content-type header is
// multipart/form-data or application/x-www-form-urlencoded, params[1] should be url.Values
// params[2] is post body which type should be []byte.
// params[3] is http client which type should be http.Client.
package netutil