Skip to content

Commit

Permalink
fixes bug with HTTPbody parameters being encoded twice
Browse files Browse the repository at this point in the history
  • Loading branch information
yuri committed Oct 7, 2014
1 parent bb112f0 commit 3615218
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Alamofire.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public enum ParameterEncoding {
mutableURLRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
}

mutableURLRequest.HTTPBody = (CFURLCreateStringByAddingPercentEscapes(nil, query(parameters!) as NSString, nil, nil, CFStringConvertNSStringEncodingToEncoding(NSUTF8StringEncoding)) as NSString).dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)
mutableURLRequest.HTTPBody = query(parameters!).dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)
}
case .JSON:
let options = NSJSONWritingOptions.allZeros
Expand Down

0 comments on commit 3615218

Please sign in to comment.