Type Method

requestWithURL:

Creates and returns a URL request for a specified URL.

Declaration

+ (instancetype)requestWithURL:(NSURL *)URL;

Parameters

theURL

The URL for the new request.

Return Value

The newly created 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

- initWithURL:

Creates 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.