Skip to content

Commit

Permalink
#update - cURL representation should included additional headers in N…
Browse files Browse the repository at this point in the history
…SURLSessionConfiguration
  • Loading branch information
rynecheow committed Oct 1, 2014
1 parent da237ff commit 3e0657c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Source/Alamofire.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,15 @@ extension Request: DebugPrintable {
}
}

for (field, value) in session.configuration.HTTPAdditionalHeaders! {
switch field {
case "Cookie":
continue
default:
components.append("-H \"\(field): \(value)\"")
}
}

if let HTTPBody = request.HTTPBody {
components.append("-d \"\(NSString(data: HTTPBody, encoding: NSUTF8StringEncoding))\"")
}
Expand Down

0 comments on commit 3e0657c

Please sign in to comment.