title: RESTKit: BaseURL & Path Pattern
body: <p>iOS7 &amp; RESTKit 0.20.3</p>
  
  <p>Below is the URL that I need to hit to get a response from Google Maps APIs (I changed the key):</p>
  
  <p><a href="https://maps.googleapis.com/maps/api/place/autocomplete/json?input=coffee&amp;sensor=true&amp;key=1234&amp;location=0.000000,0.000000&amp;radius=100.000000" rel="nofollow">https://maps.googleapis.com/maps/api/place/autocomplete/json?input=coffee&amp;sensor=true&amp;key=1234&amp;location=0.000000,0.000000&amp;radius=100.000000</a></p>
  
  <p>When I type the URL above in the browser, I get a JSON back (200 OK)</p>
  
  <p><code>input</code> is the search string the user provides.  I have hard-coded it into the URL above.</p>
  
  <p>The following is what I have tried and get a 404 error:</p>
  
  <pre><code>NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/placeautocomplete/json?input=%@&amp;sensor=true&amp;key=1234&amp;location=0.000000,0.000000&amp;radius=100.000000", [input stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
  
  NSURLRequest *request = [NSURLRequest requestWithURL:url];
  RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping
                                                                                              method:RKRequestMethodGET
                                                                                         pathPattern:@""
                                                                                             keyPath:@"predictions" statusCodes:statusCodeSet];
  </code></pre>
  
  <p>I have also tried the following that gives an error <code>Code=1001 "No response descriptors match the response loaded."</code> :</p>
  
  <pre><code>NSIndexSet *statusCodeSet = RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful);
  RKMapping *mapping = [TBSRESTMappingProvider googleAutoCompleteMapping];
  
  NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/place/autocomplete/json?input=coffee&amp;sensor=true&amp;key=1234&amp;location=0.000000,0.000000&amp;radius=100.000000"]];
  NSURLRequest *request = [NSURLRequest requestWithURL:url];
  
  
  RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:mapping
                                                                                          method:RKRequestMethodGET
                                                                                     pathPattern:@""
                                                                                         keyPath:@"predictions" statusCodes:statusCodeSet];
  
  RKObjectRequestOperation *operation = [[RKObjectRequestOperation alloc] initWithRequest:request
                                                                      responseDescriptors:@[responseDescriptor]];
  </code></pre>
  
  <ol>
  <li>What's the best practice to provide the complete URL without hard-coding the <code>input</code> <code>sensor</code> <code>location</code> <code>key</code> and <code>radius</code> ?</li>
  <li>How can I fix <code>Code=1001 "No response descriptors match the response loaded."</code>  ?</li>
  </ol>