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

pankaj21c

macrumors newbie
Original poster
Apr 15, 2009
14
0
I have to post the below data:
Any idea, how to do using HTTP Post


Request example:
------------------------------------------------------------------------
{
"authInfo": {
"authBySession": {
"session": "some string"
},
"authByEmail": {
"email": "any string",
"password": "yet another string"
},
"sessionType": "NoSession",
"authByComcast": {
"comcastUsername": "yet another string",
"password": "some string"
},
"clientInfo": {
"maxId": 0,
"clientId": "some string",
"timezone": 1001,
"version": "some string",
"contactDisplay": "firstName",
"clientOS": "any string",
"partnerId": "any string",
"model": "some string",
"clientIcon": {
"hexEncoded": "0FB7"
},
"locale": "(unknown XSD element)",
"clientName": "yet another string",
"requiredFields": {
"group": [
{
"fields": {
"separated": {
"value": [
"some string",
"yet another string"
]
},
"delimited": {
"delimiter": "any string",
"data": "any string"
}
},
"type": "Contact"
},
{
"fields": {
"separated": {
"value": [
"some string",
"some string"
]
},
"delimited": {
"delimiter": "some string",
"data": "some string"
}
},
"type": "Contact"
}
]
},
"manufacturer": "some string",
"type": "Yahoo"
}
}
}
 
Apple gives you a JSON serializer in Foundation. Look for NSJSONSerialization. Apple also gives you sample code for HTTP POSTs. Look for SimpleURLConnections.
 
JSONkit could help you for other iOSes then 5.x
There are a few third-party libraries at one's disposal, including TouchJSON and json-framework as well. But, you'll want to pick one that is supported across all the versions of iOS you are planning your app to run on rather having to integrate multiple libraries. Which is what you meant, right jnoxx? ;)
 
There are a few third-party libraries at one's disposal, including TouchJSON and json-framework as well. But, you'll want to pick one that is supported across all the versions of iOS you are planning your app to run on rather having to integrate multiple libraries. Which is what you meant, right jnoxx? ;)

Correct, but i was too lazy to type it all out like a boss (you).
The thing is, I allways tried to cross develop for iOS 3.X 4.X and now 5.X
But since 5.X i'm skipping 3.X because it's just a a bunch of (insert random word) to support it all.
Ah well, i'd say, have fun with parsers *cough*
 
The thing is, I allways tried to cross develop for iOS 3.X 4.X and now 5.X
But since 5.X i'm skipping 3.X because it's just a a bunch of (insert random word) to support it all.
Same here: only 4.0 or higher. But at what point can we reasonably abandon 4.x as well?
 
Same here: only 4.0 or higher. But at what point can we reasonably abandon 4.x as well?

I guess iOS5 my dear Dejo.
Since most people I know, don't wonna upgrade to iOS5, i'm speechless. but well..
Most people with 3GS don't wonna upgrade, because they think it'll be too slow.
So 4.x and 5.x it is..
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.