• Using xclient As HttpClient = New HttpClient()
    Dim fdict As New Dictionary(Of String, Object)
    Dim content3 As StreamContent = New StreamContent(New FileStream(context.Server.MapPath(“/youzan.jpg”), FileMode.Open))
    fdict.Add(“image”, content3)
    Dim content As HttpContent = New StringContent(JsonConvert.SerializeObject(fdict))
    content.Headers.ContentType.MediaType = “application/json”
    content.Headers.ContentType.CharSet = “utf-8”
      ’Console.WriteLine(“Request Result—— >” + content.ReadAsStringAsync().get_Result());
                            Dim message As HttpResponseMessage = xclient.PostAsync(“![null]%(file:///C:\Users\apple\AppData\Local\Temp
    W@GJ$ACOF(TYDYECOKVDYB.png)https://open. youzanyun.com/api/youzan . materials.storage.platform.img.upload/3.0.0?access_token=” & access_token, content).Result
                            If message.IsSuccessStatusCode Then
                                context.Response.Write(System.Text.Encoding.UTF8.GetString(message.Content.ReadAsByteArrayAsync.Result))
                                Exit Sub
                            End If
                        End Using

  • 这个是根据 那个 SDK 里的 DLL 反编译出来的

8匿名用户6520
新手
  • 0 标签
  • 2 帖子
  • 12 回帖



个人主页