| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/WebKit.framework |
| Availability | Available in Mac OS X v10.3.9 and later. |
| Companion guide | |
| Declared in | WebResource.h |
A WebResource object represents a downloaded URL. It encapsulates the data of the download as well as other resource properties such as the URL, MIME type, and frame name.
Use the initWithData:URL:MIMEType:textEncodingName:frameName: method to initialize a newly created WebResource object. Use the other methods in this class to get the properties of a WebResource object.
Returns the receiver’s data.
- (NSData *)data
The download data.
WebResource.hReturns the receiver’s frame name.
- (NSString *)frameName
The name of the frame. If the receiver does not represent the contents of an entire HTML frame, this method returns nil.
WebResource.hInitializes and returns a web resource instance.
- (id)initWithData:(NSData *)dataURL:(NSURL *)URLMIMEType:(NSString *)MIMETypetextEncodingName:(NSString *)textEncodingNameframeName:(NSString *)frameName
The download data.
The download URL.
The MIME type of the data.
The IANA encoding name (for example, “utf-8” or “utf-16”). This parameter may be nil.
The name of the frame. Use this parameter if the resource represents the contents of an entire HTML frame; otherwise pass nil.
An initialized web resource.
WebResource.hReturns the receiver’s MIME type.
- (NSString *)MIMEType
The MIME type of the data.
WebResource.hReturns the receiver’s text encoding name.
- (NSString *)textEncodingName
The IANA encoding name (for example, “utf-8” or “utf-16”), or nil if the name does not exist.
WebResource.hReturns the receiver’s URL.
- (NSURL *)URL
The download URL.
WebResource.h
Last updated: 2009-04-08