Skip to content

Commit 7166b30

Browse files
committed
- default Content-Type header fix
1 parent d251278 commit 7166b30

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

RESTAPI/API.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,7 @@ internal extension API {
232232
headers.forEach() {
233233
request.addValue($0.1, forHTTPHeaderField: $0.0)
234234
}
235-
if let content = params {
236-
request.addValue(content.type().headerValue, forHTTPHeaderField: "Content-Type")
237-
}
235+
request.addValue((params?.type() ?? .json).headerValue, forHTTPHeaderField: "Content-Type")
238236

239237
return request
240238
}

0 commit comments

Comments
 (0)