---
title: URL.ParseStrategy.ComponentParseStrategy.optional
framework: foundation
role: symbol
role_heading: Case
path: foundation/url/parsestrategy/componentparsestrategy/optional
---

# URL.ParseStrategy.ComponentParseStrategy.optional

A strategy that treats the presence of the associated component as optional.

## Declaration

```swift
case optional
```

## See Also

### Component parse strategies

- [URL.ParseStrategy.ComponentParseStrategy.required](foundation/url/parsestrategy/componentparsestrategy/required.md)
- [URL.ParseStrategy.ComponentParseStrategy.defaultValue(_:)](foundation/url/parsestrategy/componentparsestrategy/defaultvalue(_:).md)
