import Foundation /// The HTTP methods the Ollama API uses in v1. public enum OllamaHTTPMethod: String, Sendable { case get = "GET" case post = "POST" } /// A transport-independent Ollama request. public struct OllamaHTTPRequest: Sendable, Equatable { /// The HTTP method. public let method: OllamaHTTPMethod /// The path below the configured base URL, e.g. `/api/version`. public let path: String /// An optional JSON body. public let body: Data? /// The body content type; defaults to `application/json` when a body is present. public let contentType: String? /// Creates a request. public init( method: OllamaHTTPMethod = .get, path: String, body: Data? = nil, contentType: String? = nil ) { self.method = method self.path = path self.body = body self.contentType = contentType } }