如何在带有抖动的http请求中传递访问令牌?

问题描述 投票:0回答:1

我想使用市场营销API创建广告系列,这是Curl代码,我想转换为http发布请求:enter image description here

和带有模型类的我的HTTP请求

enter image description here

enter image description here

flutter facebook-marketing-api
1个回答
0
投票

尝试这样:

Future<http.Response> fetchAlbum() {
  return http.post(
    'https://your-url',
    body: {'name': 'doodle', 'color': 'blue'},
    headers: {HttpHeaders.authorizationHeader: "Basic your_api_token_here"},
  );
}

© www.soinside.com 2019 - 2024. All rights reserved.