【问题标题】:How to send binary data in JSON format from a .Net core application如何从 .Net 核心应用程序以 JSON 格式发送二进制数据
【发布时间】:2019-03-05 13:34:28
【问题描述】:

如何使用 BSON 格式的数据发出 HTTP 发布请求?

在.Net中我们可以用下面的代码来实现。

var bsonFormatter = new BsonMediaTypeFormatter(); response = httpClient.PostAsync(_endpoint, criteria, bsonFormatter).Result;

如何在 .net core 中实现同样的功能?

【问题讨论】:

    标签: asp.net-core .net-core


    【解决方案1】:

    我使用了 nuget 包 Microsoft.AspNet.WebApi.Client 来解决这个问题。

    【讨论】:

      猜你喜欢
      • 2016-04-27
      • 2021-09-26
      • 2017-07-12
      • 2010-10-17
      • 2018-05-14
      • 1970-01-01
      • 1970-01-01
      • 2021-09-25
      • 2020-08-01
      相关资源
      最近更新 更多