Skip to content

Instantly share code, notes, and snippets.

@maltebucksch
Created June 26, 2018 08:10
Show Gist options
  • Save maltebucksch/54d2bf9c2effacc92293f979ad226034 to your computer and use it in GitHub Desktop.
Save maltebucksch/54d2bf9c2effacc92293f979ad226034 to your computer and use it in GitHub Desktop.
Realm Sync Service: Perform-Request
private static func performRequest(method: String, url: URL, data: Data? = nil) {
if let data = data {
let json = String(decoding: data, as: UTF8.self)
print("\(method): \(url.path)\n\(json)")
} else {
print("\(method): \(url.path)")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment