Skip to content

Commit

Permalink
Work around buggy Vapor providers - don't pass empty bodies to curl
Browse files Browse the repository at this point in the history
  • Loading branch information
vzsg committed Feb 8, 2019
1 parent e9128ef commit 6d97e07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/CurlyClient/CurlyClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private extension CURLRequest {

self.options.append(.httpMethod(.from(string: "\(http.method)")))

if let data = http.body.data {
if let data = http.body.data, !data.isEmpty {
self.options.append(.postData(Array(data)))
}

Expand Down

0 comments on commit 6d97e07

Please sign in to comment.