I am trying to encode a string, but NSURLConnection does not work due to a "bad url". Here is my url:
NSString *address = mp.streetAddress; NSString *encodedAddress = [address stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSString *cityState= mp.cityState; NSString *encodedCityState = [cityState stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSString *fullAddressURL = [NSString stringWithFormat:@"http://www.zillow.com/webservice/GetDeepSearchResults.htm?zws-id=<X1-ZWz1bivd5de5mz_8xo7s>&address=%@&citystatezip=%@", encodedAddress, encodedCityState]; NSURL *url = [NSURL URLWithString:fullAddressURL];
Here is an example API for calling a URL:
The following is an example of an API call for an address to match exactly the addresses "2114 Bigelow Ave", "Seattle, WA":
http://www.zillow.com/webservice/GetDeepSearchResults.htm?zws-id=<ZWSID>&address=2114+Bigelow+Ave&citystatezip=Seattle%2C+WA
For some reason this url is not connecting. Can someone help me?
source share