NSURLResponse
NSURLResponse 是 URL 请求的响应对象基类。HTTP 响应通常会是其子类 NSHTTPURLResponse。
实例成员 (Instance members)
Section titled “实例成员 (Instance members)”initWithURLMIMETypeExpectedContentLengthTextEncodingName
Section titled “initWithURLMIMETypeExpectedContentLengthTextEncodingName”初始化响应实例。
initWithURLMIMETypeExpectedContentLengthTextEncodingName(url: NSURL, mimeType: string, length: number, name: string): voidParameters:
| Name | Type | Description |
|---|---|---|
url | NSURL | 响应 URL。 |
mimeType | string | MIME 类型。 |
length | number | 预期内容长度。 |
name | string | 文本编码名。 |
Return Value:
- 无。
响应 URL。
URL(): NSURLReturn Value:
NSURL: 响应 URL。
MIMEType
Section titled “MIMEType”MIME 类型。
MIMEType(): stringReturn Value:
string: MIME 类型。
expectedContentLength
Section titled “expectedContentLength”预期内容长度(字节)。
expectedContentLength(): numberReturn Value:
number: 长度。
textEncodingName
Section titled “textEncodingName”文本编码名。
textEncodingName(): stringReturn Value:
string: 编码名。
suggestedFilename
Section titled “suggestedFilename”建议保存文件名。
suggestedFilename(): stringReturn Value:
string: 建议文件名。
类成员 (Class members)
Section titled “类成员 (Class members)”当前运行时未额外暴露 NSURLResponse 的类成员。