Skip to content
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

Get 1.0 #37

Merged
merged 62 commits into from Jul 9, 2022
Merged

Get 1.0 #37

merged 62 commits into from Jul 9, 2022

Conversation

kean
Copy link
Owner

@kean kean commented Jul 9, 2022

  • Allow setting URLSessionDataDelegate on a per-request basis - #38
  • Allow configuring URLRequest before its sent on a per-request basis.

The new send() signature:

public func send<T: Decodable>(
    _ request: Request<T>,
    delegate: URLSessionDataDelegate? = nil,
    configure: ((inout URLRequest) -> Void)? = nil
)

Usage:

let user = try await client.send(.get("/user")) {
    $0.cachePolicy = .reloadIgnoringLocalCacheData
}
  • Add support for download tasks - #40
  • The delegate client(_:shouldRetryRequest:attempts:error:) method has a new signature and allows more than one returns attempts to be performed
  • Address #35 by providing client(_:makeURLForRequest:) method
  • Fix an issue with paths that don't start with "/" not being appended to the baseURL
  • Decode/encode on Task.detached to improve performance (previously it was done on a separate actor)
  • Add delegateQueue parameter to APIClient.Configuration
  • Add documentation generated using DocC
  • Add support for sessionDelegate from APIClient.Configuration on Linux
  • Add grammar check on CI
  • Remove APIs deprecated in previous versions
  • Hide dependencies used only in test targets

@kean kean merged commit e62a1cc into main Jul 9, 2022
@kean kean deleted the get-v1 branch July 9, 2022 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant