Network
Network 是对 Alamofire 的封装,同时加入了 OpenAPI 签名以保证网络请求的安全性。
如果需要用到签名,在 headers 中加入:
let header = [OpenApi.xRequestKey: OpenApi.xRequestValue]
如果需要发送 JSON,在headers 中加入:
let headerJson = [OpenApi.xRequestKey: OpenApi.xRequestValue, OpenApi.contentTypeKey: OpenApi.contentTypeValue]