Skip to content

Commit

Permalink
chore: deleted unnecessary Available (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
rockmagma02 authored May 4, 2024
1 parent 52438a5 commit 4ef0931
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 21 deletions.
1 change: 0 additions & 1 deletion Sources/HttpX/Client/AsyncClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import Foundation
import SyncStream

/// Synchronous HTTP client.
@available(macOS 10.15, *)
public class AsyncClient: BaseClient {
// MARK: Lifecycle

Expand Down
1 change: 0 additions & 1 deletion Sources/HttpX/Client/BaseClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import Foundation
// MARK: - BaseClient

/// The `BaseClient` class is the base class for making HTTP requests.
@available(macOS 10.15, *)
public class BaseClient {
// MARK: Lifecycle

Expand Down
1 change: 0 additions & 1 deletion Sources/HttpX/Client/SyncClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import Foundation
import SyncStream

/// Synchronous HTTP client.
@available(macOS 10.15, *)
public class SyncClient: BaseClient {
// MARK: Lifecycle

Expand Down
12 changes: 0 additions & 12 deletions Sources/HttpX/HttpX.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import Foundation
/// - Returns: The response received from the server.
///
/// - Throws: An error if the request fails.
@available(macOS 10.15, *)
public func request(
method: HTTPMethod,
url: URLType,
Expand Down Expand Up @@ -74,7 +73,6 @@ public func request(
/// - Returns: The response received from the server.
///
/// - Throws: An error if the request fails.
@available(macOS 10.15, *)
public func get(
url: URLType,
params: QueryParamsType? = nil,
Expand Down Expand Up @@ -113,7 +111,6 @@ public func get(
/// - Returns: The response received from the server.
///
/// - Throws: An error if the request fails.
@available(macOS 10.15, *)
public func post(
url: URLType,
content: Content? = nil,
Expand Down Expand Up @@ -154,7 +151,6 @@ public func post(
/// - Returns: The response received from the server.
///
/// - Throws: An error if the request fails.
@available(macOS 10.15, *)
public func put(
url: URLType,
content: Content? = nil,
Expand Down Expand Up @@ -195,7 +191,6 @@ public func put(
/// - Returns: The response received from the server.
///
/// - Throws: An error if the request fails.
@available(macOS 10.15, *)
public func patch(
url: URLType,
content: Content? = nil,
Expand Down Expand Up @@ -236,7 +231,6 @@ public func patch(
/// - Returns: The response received from the server.
///
/// - Throws: An error if the request fails.
@available(macOS 10.15, *)
public func delete(
url: URLType,
content: Content? = nil,
Expand Down Expand Up @@ -278,7 +272,6 @@ public func delete(
/// - Returns: The response received from the server.
///
/// - Throws: An error if the request fails.
@available(macOS 10.15, *)
public func request(
method: HTTPMethod,
url: URLType,
Expand Down Expand Up @@ -320,7 +313,6 @@ public func request(
/// - Returns: The response received from the server.
///
/// - Throws: An error if the request fails.
@available(macOS 10.15, *)
public func get(
url: URLType,
params: QueryParamsType? = nil,
Expand Down Expand Up @@ -359,7 +351,6 @@ public func get(
/// - Returns: The response received from the server.
///
/// - Throws: An error if the request fails.
@available(macOS 10.15, *)
public func post(
url: URLType,
content: Content? = nil,
Expand Down Expand Up @@ -400,7 +391,6 @@ public func post(
/// - Returns: The response received from the server.
///
/// - Throws: An error if the request fails.
@available(macOS 10.15, *)
public func put(
url: URLType,
content: Content? = nil,
Expand Down Expand Up @@ -441,7 +431,6 @@ public func put(
/// - Returns: The response received from the server.
///
/// - Throws: An error if the request fails.
@available(macOS 10.15, *)
public func patch(
url: URLType,
content: Content? = nil,
Expand Down Expand Up @@ -482,7 +471,6 @@ public func patch(
/// - Returns: The response received from the server.
///
/// - Throws: An error if the request fails.
@available(macOS 10.15, *)
public func delete(
url: URLType,
content: Content? = nil,
Expand Down
2 changes: 0 additions & 2 deletions Sources/HttpX/Type.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ public enum CookiesType {
// MARK: - AuthType

/// Represents the type of authentication used in network requests.
@available(macOS 10.15, *)
public enum AuthType {
/// Authentication using a class that conforms to `BaseAuth`.
case `class`(any BaseAuth)
Expand Down Expand Up @@ -210,7 +209,6 @@ public enum AuthType {
// MARK: - EventHooks

/// Represents hooks for modifying requests and responses in the networking layer.
@available(macOS 10.15, *)
public struct EventHooks {
// MARK: Lifecycle

Expand Down
3 changes: 0 additions & 3 deletions Tests/HttpXTests/Auth/BaseAuthTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import XCTest

// MARK: - BaseAuthTests

@available(macOS 10.15, *)
final class BaseAuthTests: XCTestCase {
func testSyncAuthFlowWithRequestBody() throws {
let mockAuth = MockBaseAuth(needRequestBody: true, needResponseBody: false)
Expand Down Expand Up @@ -67,7 +66,6 @@ final class BaseAuthTests: XCTestCase {

// MARK: - MockBaseAuth

@available(macOS 10.15, *)
private class MockBaseAuth: BaseAuth {
// MARK: Lifecycle

Expand Down Expand Up @@ -96,7 +94,6 @@ private class MockBaseAuth: BaseAuth {

// MARK: - MockResponse

@available(macOS 10.15, *)
private class MockResponse: Response {
var didReadAllFormSyncStream = false
var didReadAllFormAsyncStream = false
Expand Down
1 change: 0 additions & 1 deletion Tests/HttpXTests/Auth/OAuthTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
@testable import HttpX
import XCTest

@available(macOS 10.15, *)
class OAuthTests: XCTestCase {
func testAuthFlow_withValidRequest_returnsModifiedRequestAndTrue() throws {
// Given
Expand Down

0 comments on commit 4ef0931

Please sign in to comment.