Created
July 18, 2019 08:37
-
-
Save quangDecember/5f61b22afbbcdb5095983690f364d8e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let employeeInfo = """ | |
{ | |
"employeeID":156789, | |
"name": "Harris Smith" | |
} | |
""" | |
MockURLProtocol.requestHandler = { request in | |
let response = HTTPURLResponse.init(url: request.url!, statusCode: 200, httpVersion: "2.0", headerFields: nil)! | |
return (response,employeeInfo.data(using: .utf8)!) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment