Skip to content

why i don't have full cookie if using ziti sdk #276

@Dicky019

Description

@Dicky019

i am using simple example in https://github.com/openziti/ziti-sdk-swift/tree/main/cziti.sample-ios:

    urlSession.dataTask(with: urlReq) { (data, response, error) in
      guard error == nil else {
        self.setScrollableText(error!.localizedDescription)
        return
      }
      
      var docStr = ""
      if let response = response as? HTTPURLResponse {
        docStr += "Status: \(response.statusCode) " +
        "(\(HTTPURLResponse.localizedString(forStatusCode: response.statusCode)))\n" +
        response.allHeaderFields.compactMap {
          "\($0): \($1)\n"
        }.joined() + "\n"
      }
      
      if let data = data, let str = String(data: data, encoding: .utf8)  {
        docStr += "URL Req: \(urlReq.url?.absoluteString ?? "-")\n" + "URL Res: \(response?.url?.absoluteString ?? "-")\n" + "Authorization: Bearer \(token)\n\n"  + str
      } else {
        docStr += "...Unable to decode body to string..."
      }
      self.setScrollableText(docStr)
    }.resume()
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions