take one method and pass the values and check weather the value is there or not if there then Append it otherwise leave like that
for (NSString *key in parametersDictKeyValues) {
[self addArgument:key argumentValue:[parametersDict objectForKey:key]];
}
-(void)addArgument:(NSString *)key argumentValue:(id)value {
if(key != nil && value != nil) {
baseUrlWithParameters = [baseUrlWithParameters stringByAppendingFormat:@"%@=%@&",key,value];
}
}
and finally remove the last & symbol from baseUrlWithParameters