📜  set auth token flutter http - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:50.146000             🧑  作者: Mango

代码示例1
_setHeaders() => {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': 'Bearer $token'
    };

    http.Response response = await http.post(
    URL,
    body: data,
    headers: _setHeaders(),
  );