The completion handler for dataTask(with:completionHandler:) provides an instance of URLResponse. When making HTTP requests, this response is of type HTTPURLResponse (a subclass of URLResponse).
Print the statusCode and allHeaderFields to the console. These properties are very useful when debugging web service calls.