Questions tagged [nsmutableurlrequest]

NSMutableURLRequest is a subclass of NSURLRequest provided to aid developers who may find it more convenient to mutate a single request object for a series of URL load requests instead of creating an immutable NSURLRequest for each load.

Information : NSMutableURLRequest Class Reference

370 questions
0
votes
0 answers

POST request timeout ONLY on device using NSURLConnection sendSynchronousRequest

I am trying to make POST request using NSURLConnection sendSynchronousRequest. It works great when I run app on Simulator, but on real device I got timeout error (NSURLErrorDomain" - code: -1001), my server works ok My code: NSMutableURLRequest *…
0
votes
1 answer

How to Add Parameters to Existing NSMutableURLRequest with AFNetworking?

I have a NSMutableURLRequest that has been created like so: AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:]; urlRequest = [httpClient requestWithMethod:
Stunner
  • 12,025
  • 12
  • 86
  • 145
0
votes
2 answers

NSMutableURLRequest returns old values even cachePolicy is NSURLCacheStorageNotAllowed

Im using codes posted here: connection release method in connectionDidFinishLoading, causes error now first execute returns didFail log. second execute; returns old response data. albeit my (localhost) server is totally offline. and cachePolicy is…
0
votes
1 answer

How to POST question mark to a web service? Objective-c

Previously, I was having a problem in posting special characters to web service. But now, I can POST all special characters except "?" which I do not understand why. NSString+URLEndoding.h @interface NSString (NSString_URLEncoding) //originally…
Confused_person
  • 103
  • 1
  • 2
  • 11
0
votes
1 answer

How to store a $_SESSION, Objective-C

Is there any way to catch and store a $_SESSION in Objective-C at all? I know that both session and cookies is extremely intertwined, so is it possible to use NSHTTPCookie to catch it or something? Or is this something i have to handle in the php…
0
votes
3 answers

Populate UITableView with results of webservice

I have a table view which i want to populate with the results (XML) of my call to a web service. The NSURLConnection and NSMutableURLRequest that are doing the setup for this are currently in my -viewDidLoad method, and i also have all of my…
joec
  • 3,533
  • 10
  • 60
  • 89
0
votes
4 answers

How to wait till asynchronous request returns data before returning value

I have send asynchronous request to a website using the following code: NSMutableURLRequest *requestSiteToSendData = [NSMutableURLRequest requestWithURL:[[NSURL alloc]initWithString:@"www.example.com"] cachePolicy:NSURLRequestReloadIgnoringCacheData…
0
votes
0 answers

NSMutableURLRequest timeoutInterval in iOS

I am trying to adjust the timeout on a NSMutableURLRequest for a simple HTTP GET using setTimeoutSeconds:, but not having any luck. It seems to work for any values under 60.0, but if I set a larger value (ex: 90.0), then it still times out at one…
Locksleyu
  • 5,192
  • 8
  • 52
  • 77
0
votes
1 answer

iPhone dev question: NSMutableURLRequest, cannt set the _GET to my from in php

I have a php form, that is working. With that form I connect to a DB, where i get data out. :-) When I use the form from my Mac/laptop, i can enter the sata and I get the result. When i try to connect with this code under here. I can pass the form,…
Poul John
  • 3
  • 1
0
votes
1 answer

NSProgressIndicator setDoubleValue not working with argument

I'm using a NSProgressIndicator in my xcode project (Mac OS X, not iOS). I'm trying to do an async download of a file, while showing the progress of the download on a progress indicator. In my project, clicking on the update button starts the…
Tiago
  • 1,984
  • 1
  • 21
  • 43
0
votes
1 answer

Make a UIWebview display dektop not mobile page

I'm making a simple UIWebView iOS app. In it, the website I want to display is displaying as the mobile version, when I want it to display as the full version. I have this code under viewDidLoad: NSString *fullURL = @"www.facebook.com"; NSURL *url =…
falky
  • 589
  • 2
  • 11
  • 27
0
votes
2 answers

NSMutableURLRequest and JSON - How would I finish this connection?

I am trying to fetch data from an api and I have this code: // create the URL we'd like to query NSString *urlString = [NSString stringWithFormat:@"https://www.googleapis.com/adsense/v1.1/reports"]; NSString *token =…
StackOverflower
  • 1,031
  • 2
  • 12
  • 21
0
votes
0 answers

objective c nsmutablerequest (httppost) with json converted to NSData as body but web api not recognizing

This is kinda a follow up question from this previous one: https://stackoverflow.com/questions/16804632/ios-how-to-add-integer-and-null-into-json-post-using-nsmutablerequest-and-catch Basically when I try to see what type of body the…
0
votes
1 answer

NSMutableURLRequest modifying header fields

NSMutableURLRequest apparently changes case on header fields. For example, setting: [request addValue:myValue forHTTPHeaderField:@"FOOBAR"]; will change the header field to "Foobar". Anybody know a way around this? I am working with a service that…
Trevor
  • 398
  • 3
  • 6
0
votes
1 answer

iOS - Potential leak of an object allocated

I am getting Potential leak in postdata(NSData- below code ) error. Can anyone please tell me how to solve these issues? also I saw memory leak in my code [Using the build and analyze of XCode]: NSUserDefaults *defaults = [NSUserDefaults…
Suppry
  • 81
  • 1
  • 9