URLSession is not part of Foundation, it's part of FoundationNetworking and not all the API is implemented under Linux (at the moment). Since most Linux applications will run under Vapor, any code using URLSession is excluded from build and SwiftNIO is encourage (see example in README).