Questions tagged [nsurlrequest]

on iOS , NSURLRequest objects represent a URL load request in a manner independent of protocol and URL scheme. NSURLRequest encapsulates two basic data elements of a load request: the URL to load, and the policy to use when consulting the URL content cache made available by the implementation.

1095 questions
0
votes
1 answer

NSURLRequest POST request to server strange behavior! It only works sometimes

I am trying to post a string to the server. I have these codes below that I know works but only after I added at least one EMPTY entry into the database (it will show up in the database still, as basically, like this: ""). I have no idea why the…
minjiera
  • 336
  • 3
  • 16
0
votes
2 answers

get UIWebView's success loading response

I want to read the data in the UIWebView response when it succeeded loading the url. Catching this data in this method didn't give me the response: - (void) webViewDidFinishLoad:(UIWebView *)_webView { EDIT: I want to catch the…
nurnachman
  • 4,468
  • 2
  • 37
  • 40
0
votes
2 answers

NSURLConnection always failing after restarting app

I realize this is a vague question, but I'm wondering if anyone else has observed this. Here is my code for calling the NSURLConnection // Get data from server NSString *host = @"www.hostname.com"; NSString *urlString =…
Darren
  • 10,091
  • 18
  • 65
  • 108
0
votes
2 answers

Bad URL Error With NSURLRequest

I have a NSURLRequest created next way: NSString *url=[NSString…
user1506704
  • 23
  • 1
  • 3
0
votes
1 answer

NSURLConnection with thread done asynchronously but still freezing up UI

I have adopted an iOS app and am having problem asynchronous requests. We have a WebService class that has the following code; // create the request NSURLRequest* request=[NSURLRequest requestWithURL:url …
timpone
  • 19,235
  • 36
  • 121
  • 211
0
votes
2 answers

NSURLRequest HTTPBody vs. ASIHTTPRequest postBody

I'm trying to convert most of a project's NSURLRequests that use NSURLConnection to ASIHTTPRequest calls. I came across an issue about setting the HTTPBody in an ASIHTTPRequest. Here's what I had for the NSURLRequest call: NSMutableURLRequest *req…
SpacePyro
  • 3,121
  • 4
  • 25
  • 30
0
votes
3 answers

iPhone app gets null response from server about 75% of the time

I am using NSMutableURLRequest to get data from my server. The Codeigniter based api endpoint that I'm fetching from works 100% of the time from a browser for the website, but works roughly 75% of the time for the app. I ran a simple test where I…
0
votes
3 answers

NSURLRequest with multiple parameters

I am trying to set up a NSURLRequest to download a simple index.html with its externa style.css sheet but I am not quite sure how to do this.. I have only ever just formatted the URL of the request to the file I want.. but this has to be slightly…
HurkNburkS
  • 5,492
  • 19
  • 100
  • 183
0
votes
1 answer

Issue in posting an audio file to a web server through a NSURLRequest and retrieving it back

I am coding an application that needs to send audio files, in mp3 or any other common audio format, to a server. I am using a NSURLConnection instance to make this connection. I'm using the post method because the file that receives the information…
Jonathan Ginsburg
  • 1,008
  • 1
  • 8
  • 15
0
votes
1 answer

iOS download file from a URL that will redirect to the file

I've been trying for 2 days and cant figure this out. Basically I have a URL and I try to download the file that associate with it using ASIHTTPRequest, but the URL I have is not the link of the file itself, but that URL will redirect to the link of…
Kyle Mai
  • 133
  • 2
  • 14
0
votes
1 answer

NSURLRequest setHttpBody

I got a wrong post(php:echo $_POST) like below: Array ( [email"aa@qq_com] => -----------------------------14737809831466499882746641449 Content-Disposition: form-data; name="password" c8837b23ff8aaa8a2dde915473ce0991 ) my code: // set header…
anna
  • 662
  • 5
  • 28
0
votes
2 answers

Connecting with NSURLRequest

I'm using this code: NSString *recievedData; NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.site.com/"] cachePolicy:NSURLRequestUseProtocolCachePolicy …
citruspi
  • 6,709
  • 4
  • 27
  • 43
0
votes
2 answers

Handle http requests in different class

I'm trying to create a class which contains different method, each one of these methods will perform some http requests operations and return a result to the caller method. for example: UserOperations *op = [[UserOperations alloc] init]; int age =…
Kassem
  • 1,481
  • 3
  • 20
  • 42
0
votes
1 answer

Using theos, how can I download an HTML file and overwrite an existing one (objective-c)?

I am trying to make a simple application (using theos on my device so no xcode/mac, just ifile) that displays an HTML file and has a button in the navigation bar that updates the local HTML file by downloading the new version from a server and…
mobabur94
  • 360
  • 2
  • 10
0
votes
1 answer

UIWebView - What load times should I expect?

I have had a look through lots of posts but can't seem to find anything on UIWebView load times and the kind of performance to expect. I have an app that calls in a cached html page which is about 4.2KB in size. The view takes around 3.5 seconds to…
Bunkered
  • 309
  • 1
  • 3
  • 12