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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:03:54+00:00 2026-05-18T21:03:54+00:00

As of right now I’m using this code below to download files to get

  • 0

As of right now I’m using this code below to download files to get there source code:

    NSString *stringUrl = @"http://example.com/hello/goodbye.html";
NSURL *finalURL = [NSURL URLWithString:[stringUrl stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]];
self.source = [NSString stringWithContentsOfURL:finalURL encoding:NSUTF8StringEncoding error:nil];

Don’t get me wrong, it works great but it doesn’t work at all if the url doesn’t have an extension like so:

NSString *stringUrl = @"http://example2.com/something/";
NSURL *finalURL = [NSURL URLWithString:[stringUrl stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]];
self.source = [NSString stringWithContentsOfURL:finalURL encoding:NSUTF8StringEncoding error:nil];

How would I get the html source code of something that the extension isn’t defined?
Hopefully someone can help me with this because my whole project relies on getting the source from url’s with no extension. Thanks

  • 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-18T21:03:54+00:00Added an answer on May 18, 2026 at 9:03 pm

    It should work just as if there was a file defined. The GET url is merely a request to the webserver. The server is allowed to return whatever content of the “file” it wants to.

    In other words: the complexity of handling the strange URLs like that need not be a part of your downloading code (so long as you process redirect requests). That’s complexity for the server-side.

    EDIT:

    If you’re trying to get the PHP source of the page (or whatever server-side language the web application is written in), you are outta luck. All of that code is processed server side and is never sent to the client at all.

    EDIT2:

    If you’re trying to turn something like http://example2.com/something/ into http://example2.com/something/whatever-file-the-webserver-used.XXX, then you are also out of luck. Nobody ever said the webserver ever had to hand that off to a file at all — again, the URL just gets turned into a GET request to the server. The server is free to generate the response however it wishes, and it need not even consult a specific filesystem file to generate the result (it could be generated completely in memory by the webserver itself, and never touch the filesystem at all). The system need not even know the concept of a file and still be able to implement HTTP itself just fine.

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

Sidebar

Related Questions

right now i have this code using phonegap and jquerymobile $( '#user_detail' ).live( 'pageinit',function(event)
Right now i am using the ArrayList for My ListView and there is a
Right now my code looks like this: Cursor cursor = getContentResolver().query(messagesUri, null,address=?, smsNo, null);
Right now I have this code: int number = 0; DirectoryInfo di = new
Right now, I'm using this to allow a file to be moved to our
right now I'm creating an array and using: render :json => @comments This would
Right now my ant task looks like. <javadoc sourcepath=${source} destdir=${doc}> <link href=http://java.sun.com/j2se/1.5.0/docs/api/ /> </javadoc>
Right now, I have code that looks something like this: Private Sub ShowReport(ByVal reportName
Right now the code below looks for the author_id and the target_object_id in the
Right now I am writing some Python code to deal with massive twitter files.

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.