上传文件
func (c *PostGetController) sendPostFormFile(url string, filename string)(error) {
body_buf := bytes.NewBufferString("")
body_writer := multipart.NewWriter(body_buf)
// boundary默认会提供一组随机数,也可以自己设置。
body_writer.SetBoundary("Pp7Ye2EeWaFDdAY");
//boundary := body_writer.Boundary()
// 1. 要上传的数据
body_writer.WriteField("key1", "value-string1")
body_writer.WriteField("key2", fmt.Sprintf("%d", 45))
// 2. 内存中的文件1,FormFile1
_, err := body_writer.CreateFormFile("filekey1", "filename.txt")
if err != nil {
fmt