Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quangDecember/d2f2bc38cae2f22949c904f0a7c3bf90 to your computer and use it in GitHub Desktop.
Save quangDecember/d2f2bc38cae2f22949c904f0a7c3bf90 to your computer and use it in GitHub Desktop.
class EmployeeInfoRequest {
#if MOCK_URL_PROTOCOL
class iMockURLProtocol: MockURLProtocol {
override func startLoading() {
iMockURLProtocol.requestHandler = { request in
let response = HTTPURLResponse.init(url: request.url!, statusCode: 200, httpVersion: "2.0", headerFields: nil)!
return (response,mockEmployeeInfoData)
}
super.startLoading()
}
}
#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment