Questions tagged «nsmutableurlrequest»

9
在Swift中从NSString创建NSData
我试图最终NSMutableURLRequest使用有效的HTTPBody,但是似乎无法将字符串数据(来自UITextField)放入可用的NSData对象中。 我已经看到这种方法的另一种选择: NSString(data data: NSData!, encoding encoding: UInt) 但是我似乎找不到用例的任何文档。我愿意在必要时将字符串放入其他类型,但是NSData使用Swift的初始化选项似乎都不是我想要的。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.