-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot run example code #51
Labels
Comments
@X901 just specify the module as shown below: |
@ilai1823 almost. If you use extension RealHTTP {
/// Fetch the request with the default client.
public static func fetch(_ request: HTTPRequest) async throws -> HTTPResponse {
try await HTTPClient.shared.fetch(request)
}
...
} The way to go should be: extension HTTPClient {
func fetch<T: APIResourceConvertible>(_ convertible: T) async throws -> T.Result {
let result = try await convertible.request().fetch(self)
return try result.decode(T.Result.self)
}
} |
malcommac
added
documentation
Improvements or additions to documentation
question
Further information is requested
labels
Sep 12, 2022
thanks for your support @NicFontana |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
I tried your example , but I get error
That error appeared hear
The text was updated successfully, but these errors were encountered: