Instance Method

initWithURL:

Creates a URL request for a specified URL.

Declaration

- (instancetype)initWithURL:(NSURL *)URL;

Parameters

theURL

The URL for the request.

Return Value

The initialized URL request.

Discussion

The request is created with the with the default cache policy (NSURLRequestUseProtocolCachePolicy), and the default timeout interval (60 seconds).

See Also

Creating Requests

+ requestWithURL:

Creates and returns a URL request for a specified URL.

+ requestWithURL:cachePolicy:timeoutInterval:

Creates and returns an initialized URL request with specified URL, cache policy, and timeout values.

- initWithURL:cachePolicy:timeoutInterval:

Creates a URL request with the specified URL, cache policy, and timeout values.