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
1 answer

File Upload image file code in Objective C iOS

i am new to iOS application development, i just want to upload an image file using NSMutableURLRequest. The body of the request should be included with the image. I just want to send image as below as java code HttpPut mCreatePost = new…
Anil Kumar
  • 1,065
  • 1
  • 13
  • 24
0
votes
1 answer

Set http request message header ios

I have following code in my .net app. MessageHeader mhg = new MessageHeader(SomeTicket);     MessageHeader header = mhg.GetUntypedHeader("MessageName", "Namespace");    …
taffarel
  • 4,015
  • 4
  • 33
  • 61
0
votes
1 answer

How to send recursive json request with nsmutableurlrequest in ios?

in iOS to create this "{ "email":string, "password":string }" json request body, i am passing the nsdata that i create from the string email=myname@domain.com&password=mypassword to the setHTTPBody method of the NSMutableURLRequest.This works…
onuryilmaz
  • 378
  • 1
  • 4
  • 9
0
votes
1 answer

translate curl command into NSMutableUrlRequest

I'm trying to port a curl request: curl -X POST -H [header stuff] -d '{"key":"value"}' [host] into a NSMutableUrlRequest. I've stripped out what's working fine so far, and only kept what's causing me troubles, namely -d '{"key":"value"}'. The…
Alex
  • 1,581
  • 1
  • 11
  • 27
0
votes
1 answer

setHttpMethod weird behaviour

I am facing a weird problem in downloading xml files from server. I am trying to get schedulist.xml using the following code, - (void) downloadXml:(NSString*)url { _urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]]; …
Cyril
  • 1,216
  • 3
  • 19
  • 40
0
votes
1 answer

Using Cypher (Neo4j) within a REST API request (Objective C)

I am trying to query my Neo4j database, using the REST API. I have this working so far without using the Cypher query language to retrieve data, however, now I need to get nodes which are sorted by 'newest' i.e. unix timestamp DESC. I have tried to…
Adam Carter
  • 4,741
  • 5
  • 42
  • 103
0
votes
1 answer

AFHTTPRequestOperation returns cached SOAP WSDL file, testing in browser does not

I have been working on this issue for hours now, and I cannot figure it out. My server creates a WSDL file which a user can update with new functions and the WSDL file will update to reflect those changes. I am using an AFHTTPRequestOperation with…
Nic Hubbard
  • 41,587
  • 63
  • 251
  • 412
0
votes
2 answers

AFNetworking upload progress sending SOAP NSData

I am using AFNetworking and would like to upload an NSData object to my server. I am trying to upload to our SOAP server, so I have XML that I have converted to an NSData object. For some reason, the follow does NOT work: // Back to NSData …
Nic Hubbard
  • 41,587
  • 63
  • 251
  • 412
0
votes
2 answers

Why does NSMutableURLRequest instantiation cause a crash?

I am trying to create a NSMutableURLRequest like this: NSURL *URLWithString = [ NSString stringWithFormat:@"%@?%@", urlString, datas ]; NSMutableURLRequest* request = [[[NSMutableURLRequest alloc] initWithURL:URLWithString]…
Timo Ernst
  • 15,243
  • 23
  • 104
  • 165
0
votes
1 answer

NSMutableURLRequest iphone

my problem seems to be quite basic, but I can't find it! NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://miip.com"]]; and I get this error: Expected expression I can't find it! Thanks!
user1256477
  • 10,763
  • 7
  • 38
  • 62
0
votes
2 answers

NSMutableURLRequest setHTTPBody method crashes App with SIGABRT Warning

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"riderfinder.appspot.com/login"]]; [request setHTTPMethod:@"POST"]; [request setValue:@"text/plain" forHTTPHeaderField:@"Content-type"]; …
user748176
0
votes
0 answers

send parameter values and retrieve an xml file Xcode

In my current xcode project, I need to send parameter values to a url and need to retrieve an xml file based on the parameter values sent. I tried the below code but it's not working: (IBAction)myButtonClick:(id)sender { NSURL *oRequestURL =…
0
votes
0 answers

Multiple NSURLConnection's in one app confusing eachother

I have an app that uses 2 NSURLConnections to download information from a web server. They are each in completely different classes (class1 and class2). But for some reason after the one in class1 runs, and then I submit the other one in class2,…
0
votes
1 answer

How to send PostData request for NSMutableURLRequest

I have URL which takes a parameter. In Firefox. I have download add-on and find the parameter for the request. I found PostData Tab on the httpFox add-on tool and I saw the parameter and value. I created a string and added the parameter, and…
kiran
  • 4,285
  • 7
  • 53
  • 98
0
votes
2 answers

How to pass a json object as a parameter to the webservice?

I am using a webservice which takes json object as parameter. Here's my code: -(void)createHttpHeaderRequest { NSString *x = @"{\"GetVehicleInventory\": {\"ApplicationArea\": {\"Sender\": {\"ComponentID\":}}}" (something like that) …
Ashutosh
  • 5,614
  • 13
  • 52
  • 84