Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (20 sloc) 512 Bytes
//
// URLRequestExtensions.swift
// SwifterSwift
//
// Created by Omar Albeik on 9/5/17.
// Copyright © 2017 SwifterSwift
//
#if canImport(Foundation)
import Foundation
// MARK: - Initializers
public extension URLRequest {
/// SwifterSwift: Create URLRequest from URL string.
///
/// - Parameter urlString: URL string to initialize URL request from
init?(urlString: String) {
guard let url = URL(string: urlString) else { return nil }
self.init(url: url)
}
}
#endif
You can’t perform that action at this time.