Skip to content

Commit b65f980

Browse files
Fixed some minor issues introduces with logging
Motivation: Some of the convenience request methods weren't properly adapted for logging. Modifications: - Removed a doc comment from patch() that incorrectly referenced a logger. - Fixed an issue where patch() would call into post(). - Added a doc comment to delete() that references the logger. - Tests for the above come in the next commit... Result: Correct documentation and functionality for the patch() and delete() methods.
1 parent c39555d commit b65f980

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: Sources/AsyncHTTPClient/HTTPClient.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,8 @@ public class HTTPClient {
277277
/// - url: Remote URL.
278278
/// - body: Request body.
279279
/// - deadline: Point in time by which the request must complete.
280-
/// - logger: The logger to use for this request.
281280
public func patch(url: String, body: Body? = nil, deadline: NIODeadline? = nil) -> EventLoopFuture<Response> {
282-
return self.post(url: url, body: body, deadline: deadline, logger: HTTPClient.loggingDisabled)
281+
return self.patch(url: url, body: body, deadline: deadline, logger: HTTPClient.loggingDisabled)
283282
}
284283

285284
/// Execute `PATCH` request using specified URL.
@@ -338,6 +337,7 @@ public class HTTPClient {
338337
/// - parameters:
339338
/// - url: Remote URL.
340339
/// - deadline: The time when the request must have been completed by.
340+
/// - logger: The logger to use for this request.
341341
public func delete(url: String, deadline: NIODeadline? = nil, logger: Logger) -> EventLoopFuture<Response> {
342342
do {
343343
let request = try Request(url: url, method: .DELETE)

0 commit comments

Comments
 (0)