feat(app): update
This commit is contained in:
@ -44,7 +44,7 @@ func Get(url string) (response string) {
|
||||
// 发送POST请求
|
||||
// url:请求地址,data:POST请求提交的数据,contentType:请求体格式,如:application/json
|
||||
// response:请求返回的内容
|
||||
func Post(url string, data interface{}, header map[string]string) (response string) {
|
||||
func Post(url string, data any, header map[string]string) (response string) {
|
||||
jsonStr, _ := json.Marshal(data)
|
||||
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonStr))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user