python-3.x - 需要 url (demo) 用于 Ups Shipment Api 集成
问题描述
我只需要货物跟踪并请求 Api Link/任何代码。
这是演示代码: 我没有验证载体。
import requests
headers = {
'Authorization': 'ShippoToken ,<shippo_test_7406cb4031cd20465ee984a6b65595bef87cfbf8>',
'Content-Type': 'application/json',
}
data = [
('amount', '2000'),
('currency', 'usd'),
('source', 'tok_amex'),
('metadata[order_id]', '6735'),]
response = requests.post('https://api.goshippo.com/shipments/', headers=headers, data=data)
print(response.json())
解决方案
推荐阅读
- c# - 映射容器
使用 AutoMapper 到 T - serverless-framework - 无服务器从 vpc 声明中获取 VPC id
- mysql - 按护照类型选择信徒人数?
- java - 限制方法可以运行的时间量的 Java 计时器
- python - Python在特定条件下计算单词
- scala - 根据 JSON 定义验证 csv
- node.js - mongoose save() 方法从何而来?
- c - 在程序执行结束时有一个分段不知道我做错了什么
- spring-boot - 无法从jsf中的表达式语言访问get方法
- php - 我的restfull api不响应在线服务器上的数据,而是在本地服务器上工作