title: response data returning null when url works
body: <p>I'm trying to get some data sent from my app to a web server. </p>
  
  <p>What the app is supposed to do is display a list of members, show their details when selected and give the ability to edit their details. so far everything except for editing is working.</p>
  
  <p>The error message i'm getting is</p>
  
  <blockquote>
    <p>Terminating app due to uncaught exception
    'NSInvalidArgumentException', reason: 'data parameter is nil'</p>
  </blockquote>
  
  <p>The app works fine up until</p>
  
  <pre><code>NSDictionary* json = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&amp;error];
  </code></pre>
  
  <p>It appears that responseData is null. I can't understand it since the url that is generated works fine when entered into the browser.</p>
  
  <p>This is the whole code for the updating details</p>
  
  <pre><code>- (IBAction)submitEdits:(id)sender {
      smdbs_AppData *appData = [smdbs_AppData sharedInstance];
      NSString *loggedInID=appData.loggedInID;
  
      NSString *member = [self.memberDetailModel objectAtIndex:3];
  
      NSURL *urlLogin = [NSURL URLWithString:[NSString stringWithFormat:@"http://xxx/API.php?task=setMemberDetails&amp;id=%@&amp;mem_id=%@&amp;section=%@&amp;firstName=%@&amp;lastName=%@&amp;membershipNo=%@&amp;DOB=%@&amp;gender=%@&amp;school=%@&amp;religion=%@&amp;ethnicity=%@&amp;photoPerm=%@&amp;swimPerm=%@&amp;giftaid=%@&amp;giftaidperson=%@&amp;address1=%@&amp;address2=%@&amp;town=%@&amp;county=%@&amp;postCode=%@&amp;homeTelNo=%@&amp;mother=%@&amp;motherMobile=%@&amp;father=%@&amp;fatherMobile=%@&amp;other=%@&amp;relationship=%@&amp;otherTelNo=%@&amp;email1=%@&amp;email2=%@&amp;doctor=%@&amp;surgery=%@&amp;docTelNo=%@&amp;allergiesMed=%@&amp;specialNeeds=%@&amp;pack=%@&amp;six=%@&amp;joinedScouting=%@&amp;joinedBeavers=%@&amp;joinedCubs=%@&amp;joinedScouts=%@&amp;joinedYLs=%@&amp;joinedHelpers=%@&amp;joinedLeaders=%@&amp;crbDate=%@&amp;crbNo=%@", loggedInID, member, self.section.text, self.firstName.text, self.lastName.text, self.membershipNo.text, self.DOB.text, self.gender.text, self.school.text, self.religion.text, self.ethnicity.text, self.photoPerm.text, self.swimPerm.text, self.giftaid.text, self.giftaidperson.text, self.address1.text, self.address2.text, self.town.text, self.county.text, self.postCode.text, self.homeTelNo.text, self.mother.text, self.motherMobile.text, self.father.text, self.fatherMobile.text, self.other.text, self.relationship.text, self.otherTelNo.text, self.email1.text, self.email2.text, self.doctor.text, self.surgery.text, self.docTelNo.text, self.allergiesMed.text, self.specialNeeds.text, self.pack.text, self.six.text, self.joinedScouting.text, self.joinedBeavers.text, self.joinedCubs.text, self.joinedScouts.text, self.joinedYLs.text, self.joinedHelpers.text, self.joinedLeaders.text, self.crbDate.text, self.crbNo.text]];
  
      dispatch_async(kBgQueue, ^{
          NSData* editData = [NSData dataWithContentsOfURL:urlLogin];
          [self performSelectorOnMainThread:@selector(EditData:)
                                 withObject:editData waitUntilDone:YES];
      });
  }
  
  - (void)EditData:(NSData *)responseData
  {
      NSError* error;
      NSLog(@"%@",responseData);
      NSDictionary* json = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&amp;error];
      NSString* success =  [json objectForKey:@"success"];
  
      if ([success isEqualToString:@"1"]) {
          [self performSegueWithIdentifier:@"showMemberDetails" sender:nil];
      }
  }
  </code></pre>