@@ -367,14 +367,14 @@ public class NSHTTPCookie : NSObject {
367
367
*/
368
368
369
369
/*!
370
- @method requestHeaderFieldsWithCookies :
370
+ @method requestHeaderFields:with :
371
371
@abstract Return a dictionary of header fields that can be used to add the
372
372
specified cookies to the request.
373
373
@param cookies The cookies to turn into request headers.
374
374
@result An NSDictionary where the keys are header field names, and the values
375
375
are the corresponding header field values.
376
376
*/
377
- public class func requestHeaderFieldsWithCookies ( _ cookies: [ NSHTTPCookie] ) - > [ String : String] {
377
+ public class func requestHeaderFields ( with cookies: [ NSHTTPCookie] ) - > [ String : String] {
378
378
var cookieString = cookies. reduce ( " " ) { ( sum, next) -> String in
379
379
return sum + " \( next. cookieRepresentation. name) = \( next. cookieRepresentation. value) ; "
380
380
}
@@ -387,15 +387,15 @@ public class NSHTTPCookie : NSObject {
387
387
}
388
388
389
389
/*!
390
- @method cookiesWithResponseHeaderFields :forURL:
390
+ @method cookies:withResponseHeaderFields :forURL:
391
391
@abstract Return an array of cookies parsed from the specified response header fields and URL.
392
392
@param headerFields The response header fields to check for cookies.
393
393
@param URL The URL that the cookies came from - relevant to how the cookies are interpeted.
394
394
@result An NSArray of NSHTTPCookie objects
395
395
@discussion This method will ignore irrelevant header fields so
396
396
you can pass a dictionary containing data other than cookie data.
397
397
*/
398
- public class func cookiesWithResponseHeaderFields ( _ headerFields: [ String : String] , forURL URL: NSURL) - > [ NSHTTPCookie] { NSUnimplemented ( ) }
398
+ public class func cookies ( withResponseHeaderFields headerFields: [ String : String] , forURL URL: NSURL) - > [ NSHTTPCookie] { NSUnimplemented ( ) }
399
399
400
400
/*!
401
401
@method properties
@@ -464,7 +464,7 @@ public class NSHTTPCookie : NSObject {
464
464
session (regardless of expiration date), NO if receiver need not
465
465
be discarded at the end of the session.
466
466
*/
467
- public var sessionOnly : Bool {
467
+ public var isSessionOnly : Bool {
468
468
return self . cookieRepresentation. sessionOnly
469
469
}
470
470
@@ -504,7 +504,7 @@ public class NSHTTPCookie : NSObject {
504
504
@result YES if this cookie should be sent only over secure channels,
505
505
NO otherwise.
506
506
*/
507
- public var secure : Bool {
507
+ public var isSecure : Bool {
508
508
return self . cookieRepresentation. secure
509
509
}
510
510
@@ -520,7 +520,7 @@ public class NSHTTPCookie : NSObject {
520
520
@result YES if this cookie should only be sent via HTTP headers,
521
521
NO otherwise.
522
522
*/
523
- public var HTTPOnly : Bool {
523
+ public var isHTTPOnly : Bool {
524
524
return self . cookieRepresentation. HTTPOnly
525
525
}
526
526
0 commit comments