From 7187fb4cb03534a173d6430259fbc23f476542c5 Mon Sep 17 00:00:00 2001 From: Nikita Vasilev Date: Sat, 11 May 2024 18:44:25 +0400 Subject: [PATCH] Fix typos --- .../RequestBodyEncoder/RequestBodyEncoder.swift | 2 +- .../NetworkLayerInterfaces/Classes/Core/Models/IRequest.swift | 4 ++-- .../Classes/Core/Models/RequestBody.swift | 2 +- .../Tests/UnitTests/RequestParametersEncoderTests.swift | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/NetworkLayer/Classes/Core/Builders/RequestBuilder/RequestBodyEncoder/RequestBodyEncoder.swift b/Sources/NetworkLayer/Classes/Core/Builders/RequestBuilder/RequestBodyEncoder/RequestBodyEncoder.swift index db481d4..59d70ca 100644 --- a/Sources/NetworkLayer/Classes/Core/Builders/RequestBuilder/RequestBodyEncoder/RequestBodyEncoder.swift +++ b/Sources/NetworkLayer/Classes/Core/Builders/RequestBuilder/RequestBodyEncoder/RequestBodyEncoder.swift @@ -25,7 +25,7 @@ struct RequestBodyEncoder: IRequestBodyEncoder { request.httpBody = data case let .encodable(encodable): request.httpBody = try jsonEncoder.encode(encodable) - case let .dictonary(dictionary): + case let .dictionary(dictionary): request.httpBody = try JSONSerialization.data(withJSONObject: dictionary) } } diff --git a/Sources/NetworkLayerInterfaces/Classes/Core/Models/IRequest.swift b/Sources/NetworkLayerInterfaces/Classes/Core/Models/IRequest.swift index 91caaae..bcd3630 100644 --- a/Sources/NetworkLayerInterfaces/Classes/Core/Models/IRequest.swift +++ b/Sources/NetworkLayerInterfaces/Classes/Core/Models/IRequest.swift @@ -30,7 +30,7 @@ public protocol IRequest { /// The HTTP method. var httpMethod: HTTPMethod { get } - /// A dictonary that contains the request's body. + /// A dictionary that contains the request's body. var httpBody: RequestBody? { get } /// An alias for the cache policy. @@ -58,7 +58,7 @@ public extension IRequest { 60 } - /// A dictonary that contains the request's body. + /// A dictionary that contains the request's body. var httpBody: RequestBody? { nil } diff --git a/Sources/NetworkLayerInterfaces/Classes/Core/Models/RequestBody.swift b/Sources/NetworkLayerInterfaces/Classes/Core/Models/RequestBody.swift index f884d5c..3fbd4b9 100644 --- a/Sources/NetworkLayerInterfaces/Classes/Core/Models/RequestBody.swift +++ b/Sources/NetworkLayerInterfaces/Classes/Core/Models/RequestBody.swift @@ -8,5 +8,5 @@ import Foundation public enum RequestBody { case data(Data) case encodable(Encodable) - case dictonary([String: Any]) + case dictionary([String: Any]) } diff --git a/Tests/NetworkLayerTests/Classes/Tests/UnitTests/RequestParametersEncoderTests.swift b/Tests/NetworkLayerTests/Classes/Tests/UnitTests/RequestParametersEncoderTests.swift index 32995e8..d99165a 100644 --- a/Tests/NetworkLayerTests/Classes/Tests/UnitTests/RequestParametersEncoderTests.swift +++ b/Tests/NetworkLayerTests/Classes/Tests/UnitTests/RequestParametersEncoderTests.swift @@ -1,6 +1,6 @@ // // network-layer -// Copyright © 2023 Space Code. All rights reserved. +// Copyright © 2024 Space Code. All rights reserved. // import Foundation