Skip to content

Commit

Permalink
missing request data...
Browse files Browse the repository at this point in the history
  • Loading branch information
dmcyk committed Nov 8, 2016
1 parent e38477d commit 09991d3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/SwiftyCurl/cURLConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ open class cURLConnection {
curl.set(.post, value: false)
curl.set(.delete, value: nil)

if let body = req.body {
body.withUnsafeBytes {
curl.set(.postFields, value: $0)
}
}

switch req.method {
case .get:
curl.set(.get, value: true)
Expand Down

0 comments on commit 09991d3

Please sign in to comment.