Q:

*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array'

When I run this code it says that : 
* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array'
I think that the problem is that, it tries to fetch the info from here : http://maps.googleapis.com/maps/api/directions/json? but it is not able to perform that action due to the non availability of the parameters : origin=LosAngeles&destination=Texas&sensor=false
The question :
How to make *jsonURL attached (concatenated with) to *post, in order to obtain the full link in the background and process it : http://maps.googleapis.com/maps/api/directions/json?origin=LosAngeles&destination=Texas&sensor=false
but keeping the same structure (divided in that way).

A:

In order to have the parameters be part of the URL, you need to have the parameters be part of the string you pass to URLWithString:.

