---
title: cookies
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/httpcookiestorage/cookies
---

# cookies

The cookie storage’s cookies.

## Declaration

```swift
var cookies: [HTTPCookie]? { get }
```

## Discussion

Discussion If you want to sort the cookie storage’s cookies, you should use the sortedCookies(using:) method instead of sorting the result of this method.

## See Also

### Retrieving cookies

- [getCookiesFor(_:completionHandler:)](foundation/httpcookiestorage/getcookiesfor(_:completionhandler:).md)
- [cookies(for:)](foundation/httpcookiestorage/cookies(for:).md)
- [sortedCookies(using:)](foundation/httpcookiestorage/sortedcookies(using:).md)
