24 lines
453 B
Swift
24 lines
453 B
Swift
//
|
|
// CommonEnvironment.swift
|
|
//
|
|
//
|
|
// Created by Juraldinio on 04.08.2022.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct CommonEnvironment: NetworkEnvironment {
|
|
|
|
public let url: URL
|
|
public let headers: Headers?
|
|
|
|
public init(url: URL, headers: Headers? = nil) {
|
|
self.url = url
|
|
self.headers = headers
|
|
}
|
|
|
|
public init(url: URL, agent: String) {
|
|
self.init(url: url, headers: ["User-Agent": agent])
|
|
}
|
|
}
|