I’m porting a bash script in obj-c. Currently in the bash script I do ‘curl http://… > file.txt’ to download and save the webpage source code.
I played around with NSUrl, but I didn’t get it to work. Any ideas ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Are you looking for something like this –
Note that this is a synchronous method so it will block until data is downloaded.