views:

102

answers:

2

Hi All... I want to send post data from Iphone.
I have to send a dictionary(K-V pairs) with 8 k-v pairs.
What is the best way to post all these 8 K-V pairs from Iphone. I want that i should pass only Id(one of K-V pair)in the URL & remaining K-V pairs should be sent via post.
if there is something like that??

A: 

The HTTP protocol doesn't work like that. Pick POST or GET. This library makes web requests easy, including file upload: http://allseeing-i.com/ASIHTTPRequest/

Matt Williamson
no, with POST you can pass as many as you like.
Matt Williamson
A: 

I wrote a couple blog posts using NSURLConnection. One was specifically for sending POST data. Check them out. You can't send some data with GET and some data with POST. You have to commit to all one way.

Sending POST DATA

Using NSURLConnection

HTH

Conceited Code
it looks odd, but it works. You probably should create a loop to create the post data string from your K-V pairs.
Conceited Code