Instance Property


The data representation of the URL’s relativeString.


var dataRepresentation: Data { get }


If the URL was initialized with init?(dataRepresentation:relativeTo:isAbsolute:), the data representation returned are the same bytes as those used at initialization; otherwise, the data representation returned are the bytes of the relativeString encoded with UTF8 string encoding.

See Also

Working with the Data Representation of a URL

init?(dataRepresentation: Data, relativeTo: URL?, isAbsolute: Bool)

Initializes a newly created URL using the contents of the given data, relative to a base URL.