Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ All notable changes to this project will be documented in this file. Changes not

# [Unreleased]

## Fixed

- Fix misspell `serialise`. ([#473](https://github.com/httpswift/swifter/pull/473)) by [@mtgto](https://github.com/mtgto)

# [1.5.0]

## Added
Expand Down
10 changes: 5 additions & 5 deletions XCode/Sources/HttpResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public enum HttpResponseBody {
try $0.write(data)
})
case .htmlBody(let body):
let serialised = "<html><meta charset=\"UTF-8\"><body>\(body)</body></html>"
let data = [UInt8](serialised.utf8)
let serialized = "<html><meta charset=\"UTF-8\"><body>\(body)</body></html>"
let data = [UInt8](serialized.utf8)
return (data.count, {
try $0.write(data)
})
Expand All @@ -61,14 +61,14 @@ public enum HttpResponseBody {
try $0.write(data)
})
case .custom(let object, let closure):
let serialised = try closure(object)
let data = [UInt8](serialised.utf8)
let serialized = try closure(object)
let data = [UInt8](serialized.utf8)
return (data.count, {
try $0.write(data)
})
}
} catch {
let data = [UInt8]("Serialisation error: \(error)".utf8)
let data = [UInt8]("Serialization error: \(error)".utf8)
return (data.count, {
try $0.write(data)
})
Expand Down