/** * HTTP method utilities shared across the ev runtime. */ /** Supported HTTP methods for route handlers. */ export declare const HTTP_METHODS: readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]; export declare const HTTP_METHOD_LIST_DESCRIPTION: string; export declare const APPLICATION_JSON_CONTENT_TYPE = "application/json"; export declare const TEXT_HTML_CONTENT_TYPE = "text/html"; export declare const TEXT_PLAIN_CONTENT_TYPE = "text/plain"; export declare const RSC_FLIGHT_CONTENT_TYPE = "text/x-component"; export declare const TEXT_HTML_UTF8_CONTENT_TYPE = "text/html; charset=utf-8"; export declare const TEXT_PLAIN_UTF8_CONTENT_TYPE = "text/plain; charset=utf-8"; /** Union type of supported HTTP methods. */ export type HttpMethod = (typeof HTTP_METHODS)[number]; /** Type guard: returns true if value is an integer HTTP error status. */ export declare function isHttpErrorStatus(value: unknown): value is number; /** Type guard: returns true if value is an HTTP status that can include a body. */ export declare function isHttpBodyStatus(value: unknown): value is number; /** Type guard: returns true if value can be passed to the Headers constructor. */ export declare function isHeadersInit(value: unknown): boolean; /** Type guard: returns true if value is the application/json media type. */ export declare function isApplicationJsonContentType(value: unknown): value is string; /** Format a Content-Type header value for diagnostics. */ export declare function formatContentTypeHeaderValue(value: string | null): string; /** Type guard: returns true if value is the text/html media type. */ export declare function isTextHtmlContentType(value: unknown): value is string; /** Type guard: returns true if value is the React Flight media type. */ export declare function isRscFlightContentType(value: unknown): value is string; /** Type guard: returns true if value is a valid uppercase HTTP method. */ export declare function isHttpMethod(value: string): value is HttpMethod; /** * Normalize a string to a valid HttpMethod. * Returns undefined if the value is not a recognized HTTP method. */ export declare function toHttpMethod(value: string): HttpMethod | undefined; //# sourceMappingURL=contracts.d.ts.map