Separate names with a comma.
Discussion in 'Mac Programming' started by shilpa, Jun 23, 2008.
Hi all , i want to send some xml data to server.So how should i send it and using which api's.
I think we'll need more details than that. Are we talking Cocoa, Carbon, Web App, scripting language (which one)? What protocol is the server expecting to receive this over (http? ftp? sftp? httpxmlrequest from a web page?)
I am using cocoa and server excepts http request.
Then the easiest way is probably to embed a webview (doesn't have to be visible) and use it to handle all the http bit.
I do no how to use webview to transfer the data.Please guide me how to do this.I saw there is HttpMethod which is by default get.How to set it to post and make use of it in transfering data to server.
If the server expects a raw HTTP Upload then you are pretty much on your own! Cocoa does not provide an easy solution to this. I'd suggest ConnectionKit.
Note I am having to be vague: you are not providing sufficient detail on what you are trying to do or what the server expects. If you really want help I'd suggest you put more effort into asking the question and telling us exactly and precisely what you want and what you've already tried (and if you've not tried anything go and try some stuff before posting a question).
Thanks for reply.
I had one more doubt abt threads.can we run the applications in background.I am developing app which has to download for every 24 hours some xml files from net.so how to do this.If it is not possiable by threads then can i use timer .If so then how to do this.
On a Mac yes, on an iPhone no. You've not said which you are using. As I said above have you sat down and tried either threads or timers? Either can be made to work. I'm not about to write your code for you. It sounds like this is a commercial application and asking us to do you job is not really on is it?