Improved the source code documentation of the source code in the package.

This commit is contained in:
2026-03-24 01:26:27 +01:00
parent 25b62a4f67
commit a559ae0163
14 changed files with 50 additions and 24 deletions
@@ -110,6 +110,14 @@ extension AuthMiddleware: ClientMiddleware {
// MARK: Functions
/// Intercepts an outgoing HTTP request and injects authentication credentials if configured.
/// - Parameters:
/// - request: The outgoing HTTP request to potentially authenticate.
/// - body: The optional body of the HTTP request.
/// - baseURL: The base URL of the service.
/// - operationID: The identifier of the API operation being called.
/// - next: The next middleware or transport to call in the chain.
/// - Returns: The HTTP response and optional response body from the service.
public func intercept(
_ request: HTTPRequest,
body: HTTPBody?,
@@ -60,6 +60,14 @@ extension UserAgentMiddleware: ClientMiddleware {
// MARK: Functions
/// Intercepts an outgoing HTTP request and attaches the `User-Agent` header.
/// - Parameters:
/// - request: The outgoing HTTP request to modify.
/// - body: The optional body of the HTTP request.
/// - baseURL: The base URL of the service.
/// - operationID: The identifier of the API operation being called.
/// - next: The next middleware or transport to call in the chain.
/// - Returns: The HTTP response and optional response body from the service.
public func intercept(
_ request: HTTPRequest,
body: HTTPBody?,