소스 검색

Improved testability

Public constructor enables HttpRequest instance to be created during unit tests of content serving functions.
Marcin Maciukiewicz 9 년 전
부모
커밋
961079189c
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      Sources/HttpRequest.swift

+ 2 - 0
Sources/HttpRequest.swift

@@ -17,6 +17,8 @@ public class HttpRequest {
     public var address: String? = ""
     public var params: [String: String] = [:]
     
+    public init() {}
+    
     public func hasTokenForHeader(_ headerName: String, token: String) -> Bool {
         guard let headerValue = headers[headerName] else {
             return false