当我在另一个方法中调用方法时,出现错误:
“实例成员'testADB'不能用于'RequestBuilder'类型”
为什么会出现此错误?以及我该如何解决?
class RequestBuilder {
func testADB() {
}
class func getRequestForAddress(_ address: String, headers: [String: String]? = nil, parameters: [AnyHashable: Any]? = nil, httpBody: Data? = nil, httpType: HTTPMethod? = HTTPMethod.GET) -> URLRequest? {
testADB()
var request = URLRequest(url: url)
return request
}
}