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 8323845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:50:54+00:00 2026-06-08T23:50:54+00:00

I am making request on server , having spaces in URL http://xxxxxxxx.com/api/api.php?func=showAllwedsdwewsdsd&params[]=Saudi%20Arab&params[]=all I was

  • 0

I am making request on server , having spaces in URL

http://xxxxxxxx.com/api/api.php?func=showAllwedsdwewsdsd&params%5B%5D=Saudi%20Arab&params%5B%5D=all

I was getting the error Bad URL so ,

I used

   downloadURL = [downloadURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

but due this I am getting strange URL as

 http://sdsdsdsdsdsd.com/api/api.php?func=showAllsdsd&params5262721536=Saudi              0X0P+0rabia&params5 8288=All

I am also using

  downloadURL= [downloadURL stringByReplacingOccurrencesOfString:@" " withString:@"%20"];

but again strange url like

     http://xxxxxxxxx.com/api/api.php?func=showsdsdsd&params[]=Saudi 0X1.240DC0D824P-807rabia&params[]=All

Please help how can I solve this issue

Edit Pasting Big portion of code

   PropertyXMLDownloader *download=[[PropertyXMLDownloader alloc]init];
  [download setDelegate:self];
   firstAppDelegate *del=(firstAppDelegate *)[[UIApplication sharedApplication]delegate];
   NSLog(@"Country is %@",del.country);
   NSLog(@"State is %@",del.state);
//  del.country=[del.country stringByReplacingOccurrencesOfString:@" " withString:@"%20"];

   NSString *downloadURL=[NSString stringWithFormat:@"http://xxxxxxxx.com/api/api.php?func=showAll&params[]=Saudi Arabia&params[]=%@",@"all"];
      // downloadURL= [downloadURL stringByReplacingOccurrencesOfString:@" " withString:@"%20"];
       //downloadURL = [downloadURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

   NSCharacterSet *doNotWant = [NSCharacterSet characterSetWithCharactersInString:@" "];
   downloadURL = [[downloadURL componentsSeparatedByCharactersInSet: doNotWant]    componentsJoinedByString:@"%20"];


    NSLog(downloadURL); 
    [download startDownloading:downloadURL];
  • 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-06-08T23:51:00+00:00Added an answer on June 8, 2026 at 11:51 pm

    try this.

    NSCharacterSet *doNotWant = [NSCharacterSet characterSetWithCharactersInString:@" "];
    downloadURL = [[downloadURL componentsSeparatedByCharactersInSet: doNotWant]   componentsJoinedByString:@"%20"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having troubles debugging a POST request I'm making from my web server to
I'm at a point in my PHP server-side API where I am making lots
Okay so here's what I'm doing. I'm making a request to a server to
I am making an ajax request to an external php file, then returning some
I am making an http request which ends up taking more than 8 mins.
I make an AJAX POST request to a PHP script on my server. That
I'm having a PHP script connect to and communicate with a Node.js server. The
I am making a comment / request form for my website and in order
I am making a post request on an Arduino device with the Ethernet shield
I'm making a GET request against a WCF web service. My WCF service is

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.