Frage

http://mobile.gunsel.ua/index.php?r=Rupages&jsonRequest={"id_page":"2"}

So,how can I create a NSURL(and after request) from this URL.(I use NSJSONSerilization). I'm new to iOS development please help me. Thank You!

Don't offer links on apple documentation.

War es hilfreich?

Lösung 2

i'm found out!! This is was associated with Encoding)))

NSString sampleUrl = @"mobile.gunsel.ua/index.php?r=Rupages&jsonRequest={\"id_page\":\"2\"}";

 NSString encodedUrl = [sampleUrl stringByAddingPercentEscapesUsingEncoding: NSASCIIStringEncoding];

Andere Tipps

Not sure I get what you are asking, but you can use a string, then format it with your JSON (I.e concatenate the params), then create an NSUrl from that string.

 stringWithFormat

Should do the trick.

I'm not sure if that answered your question, but you need to elaborate if that's not the case.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top