Skip to content

Commit

Permalink
Encode dates in RequestBodys with ISO8601 (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortenGregersen authored Apr 15, 2024
1 parent e8ff32e commit be723e1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Bagbutik-Core/Service/RequestBody.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public protocol RequestBody: Encodable {
public extension RequestBody {
var jsonData: Data {
let encoder = JSONEncoder()
encoder.dateEncodingStrategy = .iso8601
return try! encoder.encode(self)
}
}

0 comments on commit be723e1

Please sign in to comment.