使用 Alamofire 检查服务器响应时,左括号表示什么?

What does an open bracket signify when using Alamofire to inspect a server response?

当使用 Alamofire 进行调用时,我想检查来自服务器的响应。服务器响应 { status code 400, Headers { 但不显示其余信息。这是什么意思?我非常认为问题出在我的 headers 上,但我不确定具体是什么问题。

class func missionOne(){

        let authorizationPath: String = "https://belivedev.restv2.eastus.media.azure.net/api/Channels"
        if let authorizationURL: URL = URL.init(string: authorizationPath){
            let parameters: [String : Any] = [
                "Name": "iOS-test-channel-1",
                "Description": "My channel description for use in discovery",
                "Input": [
                    "KeyFrameInterval": "",
                    "StreamingProtocol": "FragmentedMP4",
                    "AccessControl": ["IP": ["Allow": [
                        [
                            "Name": "Allow All",
                            "Address": "0.0.0.0",
                            "SubnetPrefixLength": ""
                        ]
                        ]]],
                    "Endpoints": []
                ],
                "Preview": [
                    "AccessControl": ["IP": ["Allow": [
                        [
                            "Name": "Allow All",
                            "Address": "0.0.0.0",
                            "SubnetPrefixLength": ""
                        ]
                        ]]],
                    "Endpoints": []
                ],
                "Output": ["Hls": ["FragmentsPerSegment": 1]],
                "CrossSiteAccessPolicies": [
                    "ClientAccessPolicy": "",
                    "CrossDomainPolicy": ""
                ]
            ]
            guard let bearerToken = AzureMediaServicesAPIManager.sharedInstance.authToken else { return }
            let headers = [
                "x-ms-version": "2.15",
                "Accept": "application/json",
                "Content-Type": "application/json",
                "DataServiceVersion": "3.0",
                "MaxDataServiceVersion": "3.0",
                "User-Agent": "azure media services postman collection",
                "Authorization": "Bearer \(bearerToken)",
                "Host" : "https://rest.media.azure.net"
            ]
            Alamofire.request(authorizationURL, method: .post, parameters: parameters, encoding: URLEncoding.default, headers: headers)
                .debugLog()
                .validate(statusCode: 200..<300)
                .responseJSON { response in
                    switch response.result {
                    case .failure(let error):
                        print(error.localizedDescription)
                        print("We hit the failure switch statement \(error.localizedDescription)")
                        print("The url request sent to the server is: \(response.request)")
                        print("The response sent back from the server is: \(response.response)")
                        return
                    case .success:
                        print("Validation Successful")
                        }
                    }
            }
    }

}

the response 控制台底部的过滤器仅显示包含该字符串的行。看起来该对象的 description 包含被过滤器隐藏的新行。

删除过滤器并滚动到控制台输出中的行,或执行查找以搜索输出。