【发布时间】:2013-09-17 14:00:56
【问题描述】:
我正在尝试从以下网址读取图像属性:
http://www.example.com/ws/img/8
因为它是一个网络服务,我需要将身份验证传递给 URL。 我不想下载图像来读取它的属性。所以我尝试像这样使用 CGImageSourceCreateWithURL:
CGImageSourceRef imageSourceRef = CGImageSourceCreateWithURL((__bridge CFURLRef)[NSURL URLWithString:@"http://admin:admin@www.example.com/ws/img/8"], NULL);
CFDictionaryRef props = CGImageSourceCopyPropertiesAtIndex(imageSourceRef, 0, NULL);
但是props 仍然返回 null。
有没有办法通过身份验证访问图像属性? (如果我通过 RestKit 功能下载图像,它当然可以)
谢谢
【问题讨论】:
-
您如何指定身份验证(使用 RestKit)?
-
嗨,韦恩。 RKRequest* 对象具有用户名和密码属性。
标签: ios objective-c web-services authentication