---
title: "URL.ParseStrategy.ComponentParseStrategy.defaultValue(_:)"
framework: foundation
role: symbol
role_heading: Case
path: "foundation/url/parsestrategy/componentparsestrategy/defaultvalue(_:)"
---

# URL.ParseStrategy.ComponentParseStrategy.defaultValue(_:)

A strategy that provides a default value for a component if it’s absent in the source string.

## Declaration

```swift
case defaultValue(Component)
```

## Parameters

- `Component`: A value to use in the parsed URL if the component is absent in the source string.

## See Also

### Component parse strategies

- [URL.ParseStrategy.ComponentParseStrategy.required](foundation/url/parsestrategy/componentparsestrategy/required.md)
- [URL.ParseStrategy.ComponentParseStrategy.optional](foundation/url/parsestrategy/componentparsestrategy/optional.md)
