decodeUrl(__with_) - OpenDive/AptosKit GitHub Wiki
decodeUrl(_:with:)
Decode a URL to the type T using either asyncData() for the Production Server;
or using decode() for the Mock Server.
public func decodeUrl<T: Decodable>(
_ type: T.Type = T.self,
with url: URL
)
Parameters
- type: The type of
Tthat the data will decode to. - url: The input url of type
URLthat will be fetched. - apiKey: The API Key for use with the Production Server.
Returns
The decoded object of type T.