Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7278711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:54:43+00:00 2026-05-28T22:54:43+00:00

When i try to look for a location like this: Florida,USA it goes OK,

  • 0

When i try to look for a location like this: Florida,USA it goes OK, but when i try it like this: Florida USA, i got that error:

Unable to create Request (bad url?)

The problem belongs with the spaces on the location taped, is there any way to resolve that?

NSString *urlString = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/geocode/json?address=%@&sensor=true",theLocationString];
    //Create a URL object.
    NSURL *url = [NSURL URLWithString:urlString];
    ASIFormDataRequest *request=[ASIFormDataRequest requestWithURL:url];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T22:54:43+00:00Added an answer on May 28, 2026 at 10:54 pm

    I think the problem is that you need to urlencode your string. A space character isn’t a valid url string:

    NSString *urlString = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/geocode/json?address=%@&sensor=true",theLocationString];
    //Create a URL object.
    NSURL *url = [NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding:
                        NSASCIIStringEncoding]];
    ASIFormDataRequest *request=[ASIFormDataRequest requestWithURL:url];
    

    If NSASCIIStringEncoding doesn’t work you could try: NSUTF8StringEncoding

    ..fredrik

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Take a look that the following code snippet: A a = null try {
There are a lot of websites that look professional in Google results. Try searching
I am getting this error when I try to send via the local server
I'm learning mysql and have been trying to get this working, but an error
another django question. I have a edit form like this. Look at current_status in
This is probably not secure but ignore that. Ive made a simple homepage with
I have a site whose URLs look like http://www.example.com/NY-2010/ http://www.example.com/NY-2010/location/ http://www.example.com/NY-2010/something-else/ http://www.example.com/Washington-2009/ http://www.example.com/Washington-2009/location/ http://www.example.com/Washington-2009/something-else/
I try to get string from this url: http://autoc.finance.yahoo.com/autoc?query=google&callback=YAHOO.Finance.SymbolSuggest.ssCallback When I look at this
Example: http://83.254.82.145:8080/android/ Look at the menu at the bottom of the map. Try moving
Try this code - import java.io.StringReader; public class StringReaderTest { public static void main(String[]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.