title: send JSON Object Request to Server
body: <p>Iam sending JSON Object request to the server but server returns Status Code 405. how to solve this problem. please any one help me.
  My code :</p>
  
  <pre><code>+(NSData *)GpBySalesDetailed:(NSMutableDictionary *)spDetailedDict{
  
  NSLog(@"spDetailedDict:%@",spDetailedDict);
  NSString *dataString = [spDetailedDict JSONRepresentation];
  NSLog(@"%@dataString",dataString);
  
  return [dataString dataUsingEncoding:NSUTF8StringEncoding];
  }
  -(void)requestWithUrl:(NSURL *)url WithJsonData:(NSData *)JsonData
  {
     NSMutableURLRequest *urlRequest=[[NSMutableURLRequest alloc]initWithURL:@"http://srbisolutions.com/SmartReportService.svc/GpBySalesPersonDetailed];
  if (JsonData != nil) {
      [urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
      [urlRequest setHTTPMethod:@"POST"];
      [urlRequest setHTTPBody:JsonData];
  }
  else
  {
      [urlRequest setHTTPMethod:@"GET"];  
  }
  NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:urlRequest delegate:self startImmediately:YES];
  [conn start];
  }
  </code></pre>