Skip to content

Commit

Permalink
Merge pull request Alamofire#140 from rynecheow/master
Browse files Browse the repository at this point in the history
cURL representation should included additional headers in NSUR...
  • Loading branch information
mattt committed Oct 5, 2014
2 parents c99e9ff + 3e0657c commit 06349a4
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 @@ -1251,6 +1251,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 06349a4

Please sign in to comment.