Objective-C datatypes and HTTP stream header contents?
I am trying to read out some values from response headers from a Shoutcast stream.
In the following code, what datatypes should my variables be when reading the values?
*datatype* header = CFReadStreamCopyProperty(str开发者_如何学Ceam, kCFStreamPropertyHTTPResponseHeader);
*datatype* varname = CFHTTPMessageCopyAllHeaderFields(header);
EDIT:
Using Jacob Relkin's answer, I get the following warning on the first line
initialization discards qualifiers from pointer target type
and the following warnings from the second line
passing argument 1 of 'CFHTTPMessageCopyAllHeaderFields' from incompatible pointer type
CFHTTPMessageRef
and CFDictionary *
(which is toll-free bridged to NSDictionary
)
精彩评论