Skip to content

Commit

Permalink
change used method
Browse files Browse the repository at this point in the history
Signed-off-by: Rafal Augustyniak <[email protected]>
  • Loading branch information
Augustyniak committed Jun 28, 2022
1 parent 75a586d commit 7295362
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions examples/swift/async_await/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ private extension StreamClient {
let stream = self
.newStreamPrototype()
.setOnResponseHeaders { headers, _, _ in
let allHeaders = headers.allHeaders()

if headers.value(forName: ":status")?.first == "200",
let contentLengthValue = headers.value(forName: "content-length"),
let firstContentLength = contentLengthValue.first,
Expand Down
2 changes: 1 addition & 1 deletion examples/swift/hello_world/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ final class ViewController: UITableViewController {
let statusCode = headers.httpStatus.map(String.init) ?? "nil"
let message = "received headers with status \(statusCode)"

let headerMessage = headers.allHeaders()
let headerMessage = headers.caseSensitiveHeaders()
.filter { kFilteredHeaders.contains($0.key) }
.map { "\($0.key): \($0.value.joined(separator: ", "))" }
.joined(separator: "\n")
Expand Down
2 changes: 1 addition & 1 deletion test/swift/apps/experimental/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ final class ViewController: UITableViewController {
let statusCode = headers.httpStatus.map(String.init) ?? "nil"
let message = "received headers with status \(statusCode)"

let headerMessage = headers.allHeaders()
let headerMessage = headers.caseSensitiveHeaders()
.filter { kFilteredHeaders.contains($0.key) }
.map { "\($0.key): \($0.value.joined(separator: ", "))" }
.joined(separator: "\n")
Expand Down

0 comments on commit 7295362

Please sign in to comment.