Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Authentication 如何设置';X-IW-SESSION';飘飘然_Authentication_Flutter_Authorization - Fatal编程技术网

Authentication 如何设置';X-IW-SESSION';飘飘然

Authentication 如何设置';X-IW-SESSION';飘飘然,authentication,flutter,authorization,Authentication,Flutter,Authorization,我正在将我雇主当前的安卓应用程序转换为flutter。我最近面临的困难之一是如何使用json将数据发布到服务器 对于某些数据事务,服务器需要“X-IW-SESSION”,在原始应用程序中设置如下: httpURLConnection.setRequestProperty("X-IW-SESSION", session); 我已尝试使用以下属性,但无法获得所需的结果 Map<String, String> headers = { HttpHeaders.contentT

我正在将我雇主当前的安卓应用程序转换为flutter。我最近面临的困难之一是如何使用json将数据发布到服务器

对于某些数据事务,服务器需要“X-IW-SESSION”,在原始应用程序中设置如下:

httpURLConnection.setRequestProperty("X-IW-SESSION", session);

我已尝试使用以下属性,但无法获得所需的结果

Map<String, String> headers = {
      HttpHeaders.contentTypeHeader: "application/json",
      HttpHeaders.authorizationHeader: session,
    };
如果我需要显示一些特定的代码,请告诉我

也许这样行得通

Map<String, String> headers = {
      HttpHeaders.contentTypeHeader: "application/json",
      ”X-IW-SESSION”: session,
    };
映射头={
HttpHeaders.contentTypeHeader:“应用程序/json”,
“X-IW-SESSION”:会话,
};

如果是,请检查HttpHeaders中的声明。

该声明不起作用。我尝试了几乎所有可能与授权/登录有关的标题。但由于某种原因,到目前为止还没有任何进展。
Map<String, String> headers = {
      HttpHeaders.contentTypeHeader: "application/json",
      ”X-IW-SESSION”: session,
    };