我想使用市场营销API创建广告系列,这是Curl代码,我想转换为http发布请求:
和带有模型类的我的HTTP请求
尝试这样:
Future<http.Response> fetchAlbum() { return http.post( 'https://your-url', body: {'name': 'doodle', 'color': 'blue'}, headers: {HttpHeaders.authorizationHeader: "Basic your_api_token_here"}, ); }