Skip to content

Commit

Permalink
[324] [Chore] Remove comments and default items
Browse files Browse the repository at this point in the history
  • Loading branch information
Shayokh144 committed Nov 29, 2022
1 parent 653aa94 commit 7cfad00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ extension NetworkAPIProtocol {
configuration: RequestConfiguration
) -> Single<T> {
provider.rx.request(configuration)
.filterSuccessfulStatusAndRedirectCodes()
.map(T.self)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,17 @@
import Foundation
import Moya

enum RequestConfiguration {

/// Add cases for each endpoint
}
enum RequestConfiguration {}

extension RequestConfiguration: TargetType {

/// Return base URL for a target
var baseURL: URL { URL(string: "https://base_url")! }

/// Return endpoint path for each endpoint case
var path: String { "" }

/// Return HTTP method for each endpoint case
var method: Moya.Method { .get }

/// Build and Return HTTP task for each endpoint case
var task: Moya.Task { .requestPlain }

/// Return the appropriate HTTP headers for every endpoint case
var headers: [String: String]? { ["Content-Type": "application/json"] }

/// Return stub/mock data for use in testing. Default is `Data()`
var sampleData: Data { Data() }

/// Return the type of validation to perform on the request. Default is `.none`.
var validationType: ValidationType { .successCodes }
var headers: [String: String]? { nil }
}

0 comments on commit 7cfad00

Please sign in to comment.