import Foundation

public struct Request<Response>: @unchecked Sendable {
    /// HTTP method, e.g. "GET".
    public var method: String
    /// Resource URL. Can be either absolute or relative.
    public var path: String
    /// Request query items.
    public var query: [(String, String?)]?
    /// Request body.
    public let body: Encodable?
    /// Request headers to be added to the request.
    public var headers: [String: String]?
    /// ID provided by the user. Not used by the API client.
    public var id: String?

    public init(
        path: String,
        method: String = "GET",
        query: [(String, String?)]? = nil,
        body: Encodable? = nil,
        headers: [String: String]? = nil,
        id: String? = nil
    ) {
        self.method = method
        self.path = path
        self.query = query
        self.headers = headers
        self.body = body
        self.id = id
    }
}
