Skip to content

Commit

Permalink
Updated the migration guide with the parameter encoding updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnoon committed Sep 10, 2015
1 parent a3dcf54 commit bd33eee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Documentation/Alamofire 2.0 Migration Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,14 @@ Encoding `MultipartFormData` previous returned an `EncodingResult` to encapsulat

### Parameter Encoding

#### ACL Updates

The `ParameterEncoding` enumeration implementation was previously hidden behind `internal` and `private` ACLs. Alamofire 2.0 opens up the `queryComponents` and `escape` methods to make it much easier to implement `.Custom` cases.

#### Encoding in the URL

In the previous versions of Alamofire, `.URL` encoding would automatically append the query string to either the URL or HTTP body depending on which HTTP method was set in the `NSURLRequest`. While this satisfies the majority of common use cases, it made it quite difficult to append query string parameter to a URL for HTTP methods such as `PUT` and `POST`. In Alamofire 2.0, we've added a second URL encoding case, `.URLEncodedInURL`, that always appends the query string to the URL regardless of HTTP method.

### Server Trust Policies

In Alamofire 1.x, the `ServerTrustPolicyManager` methods were internal making it impossible to implement any custom domain matching behavior. Alamofire 2.0 opens up the internals with a `public` ACL allowing more flexible server trust policy matching behavior (i.e. wildcarded domains) through subclassing.
Expand Down

0 comments on commit bd33eee

Please sign in to comment.