 
					陪伴而非守候
					这是使用多部分请求的示例。我根据处理 JSON 文档的一段代码修改了它,因此其中可能存在一些错误,但它应该给您一个想法:        body := bytes.Buffer{}        writer := multipart.NewWriter(&body)        hdr := textproto.MIMEHeader{}        hdr.Set("Content-Type", "text/plain")        part, _ := writer.CreatePart(hdr)        part.Write(data1)        hdr = textproto.MIMEHeader{}        hdr.Set("Content-Type", <image type>)        part, _ = writer.CreatePart(hdr)        part.Write(imageData)        ... // Add more parts if you need to        writer.Close()        request, _ := http.NewRequest(http.MethodPost, url, &body)        request.Header.Set("Content-Type", fmt.Sprintf("multipart/mixed;boundary=%s", writer.Boundary()))        hcli := http.Client{}        rsp, err := hcli.Do(request)