heckj / swiftui-notes

content for Using Combine - notes on learning Combine with UIKit and SwiftUI

Home Page:https://heckj.github.io/swiftui-notes/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug URLResponse uses `statusCode` not `status_code`

heckj opened this issue · comments

Sample code in the work:

guard let httpResponse = response as? HTTPUrlResponse, 
                   httpResponse.status_code == 200 else {
                       throw MyNetworkingError.invalidServerResponse
            }

doesn't compile - status_code isn't a thing, it is statusCode: