json - EasyPost 是否有任何文档显示请求的原始 JSON,包括标头?或者例如邮递员系列?
问题描述
我只是在为与 EasyPost 的 Shipping API 的集成做准备,这将是服务器端 C#,但我们总是为新的集成构建一个 PostMan 集合,这样如果出现问题,我们可以独立于应用程序测试数据。虽然我确实喜欢 EP 提供 C# 库和示例这一事实,但我正在努力寻找任何只为我提供所需标头列表和任何请求正文的原始 JSON 格式的东西。感觉有点像他们只是有点太有帮助了。我可能会查看 Orders 端点。
我有一个帐户,我检查了他们的所有文档并搜索了互联网,但没有找到任何东西,所以我希望我不是第一个想要使用客户端应用程序在我的代码之外进行测试的开发人员。
解决方案
EasyPost does not provide a public Postman collection; however, here is an example of a shipment Postman body (raw) that could be used. You can adjust the values, actions, objects, etc to your needs.
Using the following, you shouldn't need to pass any headers. You'll pass your API key under the username
field with the Basic Auth
authorization type.
{
"shipment": {
"to_address": {
"id": "adr_123..."
},
"from_address": {
"id": "adr_123..."
},
"parcel": {
"id": "prcl_123..."
},
"carrier_accounts": {
"id": "ca_123..."
},
"options": {
"address_validation_level": "0"
}
},
"format": "json",
"controller": "shipments",
"action": "create"
}
推荐阅读
- php - 在 CodeIgniter 中显示长脚本执行期间的实时进度和任何错误
- excel - VBScript刷新特定文件夹中的所有excel文件
- html - Bootstrap 4网格布局定制
- android - 在 Android 清单中 android:name 显示错误 -- parse sdk android
- asp.net-mvc - Transport Tracker 以在 MVC Web 应用程序中的 Google 地图上跟踪公交车
- android - 使用 minifyEnabled true 来避免 multidex 禁用断点 - 如何修复?
- javascript - 页面速度见解:渲染阻止字体真棒
- php - 沃尔玛库存更新无法面对 400
- string - 如何使用字符串值访问对象
- ember.js - 对不同的后端服务器请求使用不同的 ember 适配器