Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
Hi all..
I want to send a xml file to a particular server in my iPhone application...
Kindly reply with what class i want to make use of?
i ddnt find any HTTP classes.... (like httpRequest or httpResponse )

Thanks...
:)
 

HiRez

macrumors 603
Jan 6, 2004
6,250
2,576
Western US
Not really sure, but the easiest way may be to wrap the UNIX command curl in an NSTask. I've used this technique for desktop Cocoa apps, I think it would probably work in an iPhone app as well. A long time ago there were rumors of an NSUpload class, but I don't think anything like that ever made it to daylight. NSURLConnection appears to be mostly for getting things off the net and not the other way around. Do you need to get progress as your file is uploaded or is it enough to send it on its way and be done with it? If the latter, curl is very easy to use.
 

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
Not really sure, but the easiest way may be to wrap the UNIX command curl in an NSTask. I've used this technique for desktop Cocoa apps, I think it would probably work in an iPhone app as well. A long time ago there were rumors of an NSUpload class, but I don't think anything like that ever made it to daylight. NSURLConnection appears to be mostly for getting things off the net and not the other way around. Do you need to get progress as your file is uploaded or is it enough to send it on its way and be done with it? If the latter, curl is very easy to use.

Thank you...
But i ddnt get what u meant by "progress".
I just want to send and xml file when user taps "Place my Order" button, and show the user a uploading progress (UI part) and finally a message in alertView "SUCCESSFULLY PLACED UR ORDER".....

(If u are aware of MelissaData addresss Verification)
i Think my criteria looks same as we using melissaData xml upload for address verification. i did it windows Mobile with apt APIs, beinga newbie to apple environment i ddnt find any thing regarding this.


Hope u can guide me little more specific...
 

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
Not really sure, but the easiest way may be to wrap the UNIX command curl in an NSTask. I've used this technique for desktop Cocoa apps, I think it would probably work in an iPhone app as well. A long time ago there were rumors of an NSUpload class, but I don't think anything like that ever made it to daylight. NSURLConnection appears to be mostly for getting things off the net and not the other way around. Do you need to get progress as your file is uploaded or is it enough to send it on its way and be done with it? If the latter, curl is very easy to use.

Hi,

I didnt get the necessary inof from any response..
Thats y i am askng again???

How to request a "POST" using NSURLRequest class methods???
I want to send a xml to url

http://yyyy.mydomain.com/action.do.

Also i want to catch the xml file which is the response for that request...
 

newb16

macrumors regular
Feb 27, 2008
100
0
How to request a "POST" using NSURLRequest class methods???
I want to send a xml to url

http://yyyy.mydomain.com/action.do.

Also i want to catch the xml file which is the response for that request...

Y tride Harrington NSURLConnection in gugl search isnt it some type of what y looked for?

and finally a message in alertView "SUCCESSFULLY PLACED UR ORDER".....
may y surmaze it some not exact wording here
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.