Skip to content

Commit e1fd867

Browse files
committed
Override NSURLRequest's private initializer so as to inherit NSURLRequest convenience initalizers
1 parent 370af15 commit e1fd867

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

Foundation/NSURLRequest.swift

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -311,23 +311,11 @@ public class NSMutableURLRequest : NSURLRequest {
311311
private var _HTTPMethod: String? = "GET"
312312

313313
public required init?(coder aDecoder: NSCoder) {
314-
NSUnimplemented()
315-
}
316-
317-
/*!
318-
@method initWithURL:
319-
@abstract Initializes an NSMutableURLRequest with the given URL.
320-
@discussion Default values are used for cache policy
321-
(NSURLRequestUseProtocolCachePolicy) and timeout interval (60
322-
seconds).
323-
@param URL The URL for the request.
324-
@result An initialized NSMutableURLRequest.
325-
*/
326-
public init(URL: NSURL) {
327314
super.init()
328-
_URL = URL
329315
}
330316

317+
private override init() { super.init() }
318+
331319
/*!
332320
@method URL
333321
@abstract Sets the URL of the receiver.

0 commit comments

Comments
 (0)