RequestURL
@propertyWrapper
public struct RequestURL : Encodable
A property wrapper that provides a convenient way to handle request URLs.
The RequestURL struct is a property wrapper that allows you to specify the URL for a request.
It wraps a URL? value and provides a default value of nil.
Example usage:
@RequestURL var url: URL?
-
The wrapped value representing the request URL.
This property holds the
URL?value that is managed by this property wrapper.Declaration
Swift
public var wrappedValue: URL? -
Initializes a new instance of
RequestURLwith the specified wrapped value.Example usage:
@RequestURL var url: URL? = URL(string: "https://api.example.com/resource")Declaration
Swift
public init(wrappedValue: URL? = nil)Parameters
wrappedValueThe wrapped value representing the request URL. Defaults to
nil.
View on GitHub