Skip to content

Commit

Permalink
Merge pull request #2 from luckymarmot/fix-params
Browse files Browse the repository at this point in the history
Fix missing request initialization
  • Loading branch information
nfgrilo committed Nov 4, 2015
2 parents 4b8beb0 + 3abda7a commit b2a8dfa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions objc.mustache
Expand Up @@ -14,10 +14,14 @@
@"{{{name}}}":@"{{{value}}}",
{{/url.params}}
};

NSMutableURLRequest* request = [[AFHTTPRequestSerializer serializer] requestWithMethod:@"{{{request.method}}}" URLString:@"{{{url.base}}}" parameters:URLParameters error:NULL];

{{/url.has_params}}
{{^url.has_params}}
// Create request
NSMutableURLRequest* request = [[AFHTTPRequestSerializer serializer] requestWithMethod:@"{{{request.method}}}" URLString:@"{{{url.base}}}" parameters:nil error:NULL];

{{/url.has_params}}
{{/has_params_and_body}}
{{! ----- }}
{{#body.has_url_encoded_body}}
Expand Down

0 comments on commit b2a8dfa

Please sign in to comment.