One Logo Pool Ball
Foundation · IOS API REFERENCE

NSURLRequest

class · iOS 2.0+ · SDK 27.1

class NSURLRequest

Members (24)

get · iOS 2.0+

supportsSecureCoding

TypeScript
static get supportsSecureCoding(): boolean
Swift declaration
class var supportsSecureCoding: Bool { get }
init · iOS 2.0+

init

TypeScript
static initUrl(URL: string): NSURLRequest
Swift declaration
convenience init(url URL: URL)
init · iOS 2.0+

init

TypeScript
static initUrlCachePolicyTimeoutInterval(URL: string, cachePolicy: NSURLRequest_CachePolicy, timeoutInterval: number): NSURLRequest
Swift declaration
init(url URL: URL, cachePolicy: NSURLRequest.CachePolicy, timeoutInterval: TimeInterval)
method

value

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

httpBody

TypeScript
get httpBody(): (ArrayBuffer) | null
Swift declaration
var httpBody: Data? { get }
get

httpBodyStream

TypeScript
get httpBodyStream(): (InputStream) | null
Swift declaration
var httpBodyStream: InputStream? { get }
get

httpMethod

TypeScript
get httpMethod(): (string) | null
Swift declaration
var httpMethod: String? { get }
get

httpShouldHandleCookies

TypeScript
get httpShouldHandleCookies(): boolean
Swift declaration
var httpShouldHandleCookies: Bool { get }
get · iOS 4.0+ · Deprecated in iOS 18.4

httpShouldUsePipelining

TypeScript
get httpShouldUsePipelining(): boolean
Swift declaration
var httpShouldUsePipelining: Bool { get }
get · iOS 2.0+

url

TypeScript
get url(): (string) | null
Swift declaration
var url: URL? { get }
get

allHTTPHeaderFields

TypeScript
get allHTTPHeaderFields(): (Record<string, string>) | null
Swift declaration
var allHTTPHeaderFields: [String : String]? { get }
get · iOS 6.0+

allowsCellularAccess

TypeScript
get allowsCellularAccess(): boolean
Swift declaration
var allowsCellularAccess: Bool { get }
get · iOS 13.0+

allowsConstrainedNetworkAccess

TypeScript
get allowsConstrainedNetworkAccess(): boolean
Swift declaration
var allowsConstrainedNetworkAccess: Bool { get }
get · iOS 13.0+

allowsExpensiveNetworkAccess

TypeScript
get allowsExpensiveNetworkAccess(): boolean
Swift declaration
var allowsExpensiveNetworkAccess: Bool { get }
get · iOS 18.0+

allowsPersistentDNS

TypeScript
get allowsPersistentDNS(): boolean
Swift declaration
var allowsPersistentDNS: Bool { get }
get · iOS 26.1+

allowsUltraConstrainedNetworkAccess

TypeScript
get allowsUltraConstrainedNetworkAccess(): boolean
Swift declaration
var allowsUltraConstrainedNetworkAccess: Bool { get }
get · iOS 14.5+

assumesHTTP3Capable

TypeScript
get assumesHTTP3Capable(): boolean
Swift declaration
var assumesHTTP3Capable: Bool { get }
get · iOS 15.0+

attribution

TypeScript
get attribution(): NSURLRequest_Attribution
Swift declaration
var attribution: NSURLRequest.Attribution { get }
get · iOS 2.0+

cachePolicy

TypeScript
get cachePolicy(): NSURLRequest_CachePolicy
Swift declaration
var cachePolicy: NSURLRequest.CachePolicy { get }
get · iOS 18.2+

cookiePartitionIdentifier

TypeScript
get cookiePartitionIdentifier(): (string) | null
Swift declaration
var cookiePartitionIdentifier: String? { get }
get · iOS 2.0+

mainDocumentURL

TypeScript
get mainDocumentURL(): (string) | null
Swift declaration
var mainDocumentURL: URL? { get }
get · iOS 4.0+

networkServiceType

TypeScript
get networkServiceType(): NSURLRequest_NetworkServiceType
Swift declaration
var networkServiceType: NSURLRequest.NetworkServiceType { get }
get · iOS 16.1+

requiresDNSSECValidation

TypeScript
get requiresDNSSECValidation(): boolean
Swift declaration
var requiresDNSSECValidation: Bool { get }
get · iOS 2.0+

timeoutInterval

TypeScript
get timeoutInterval(): number
Swift declaration
var timeoutInterval: TimeInterval { get }

Skipped declarations

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

NSURLRequest.init()

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

All Foundation types →