Xamarin + RestSharp 请求返回空 JSON

Xamarin + RestSharp request returning empty JSON

我正在尝试从 Flask-RESTful API 获取 JSON 但不是:

  [
   [
    {
      "c_t": [],
      "imie": "test",
      "login": "test2",
      "nazwisko": "test3",
      "oferty": [],
      "password": "passpass",
      "user_id": 13,
      "u_t": []
    }
  ],
  {}
]

我得到空字符串 response.Content。这是我的代码:

var client = new RestClient("https://SERVER-IP");
var request = new RestRequest("/users", Method.GET);

request.AddHeader("Content-Type", "application/json");

client.ExecuteAsync(request, response =>
{
 RunOnUiThread(delegate
 {
    var responseC = response.Content;

    Toast.MakeText(this, responseC, Toast.Length.Long).Show();
 });
});

使用 http 而不是 https ;) 这就是为我们修复它的原因。