Вопрос

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.

Это было полезно?

Решение 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];

Другие советы

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top