One Logo Pool Ball
Foundation · IOS API REFERENCE

HTTPURLResponse

class · iOS 2.0+ · SDK 27.1

class HTTPURLResponse

Members (5)

static · iOS 2.0+

localizedString

TypeScript
static localizedString(statusCode: number): string
Swift declaration
class func localizedString(forStatusCode statusCode: Int) -> String
init · iOS 5.0+

init

TypeScript
static init(url: string, statusCode: number, HTTPVersion?: (string) | null, headerFields?: (Record<string, string>) | null): (HTTPURLResponse) | null
Swift declaration
init?(url: URL, statusCode: Int, httpVersion HTTPVersion: String?, headerFields: [String : String]?)
method · iOS 13.0+

value

TypeScript
value(field: string): (string) | null
Swift declaration
func value(forHTTPHeaderField field: String) -> String?
get · iOS 2.0+

allHeaderFields

TypeScript
get allHeaderFields(): NativeMap<unknown, unknown>
Swift declaration
var allHeaderFields: [AnyHashable : Any] { get }
get · iOS 2.0+

statusCode

TypeScript
get statusCode(): number
Swift declaration
var statusCode: Int { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

HTTPURLResponse.init()

inherited init: cannot prove legal (class declares 2 custom initializers)

All Foundation types →