/**
 * HTTP constants used throughout the HTTP engine
 */
// HTTP Status Code Ranges
export const REDIRECT_START = 300;
export const REDIRECT_END = 399;
export const CLIENT_ERROR_START = 400;
export const CLIENT_ERROR_END = 499;
export const SERVER_ERROR_START = 500;
export const SERVER_ERROR_END = 599;
// Specific Status Codes
export const STATUS_OK = 200;
export const STATUS_MOVED_PERMANENTLY = 301;
export const STATUS_FOUND = 302;
export const STATUS_SEE_OTHER = 303;
export const STATUS_NOT_MODIFIED = 304;
export const STATUS_USE_PROXY = 305;
export const STATUS_TEMPORARY_REDIRECT = 307;
export const STATUS_PERMANENT_REDIRECT = 308;
export const STATUS_UNAUTHORIZED = 401;
export const STATUS_PROXY_AUTHENTICATION_REQUIRED = 407;
// HTTP Methods
export const METHOD_GET = 'GET';
export const METHOD_HEAD = 'HEAD';
export const METHOD_POST = 'POST';
export const METHOD_PUT = 'PUT';
export const METHOD_DELETE = 'DELETE';
export const METHOD_PATCH = 'PATCH';
export const METHOD_OPTIONS = 'OPTIONS';
export const METHOD_TRACE = 'TRACE';
export const METHOD_CONNECT = 'CONNECT';
// HTTP Headers
export const HEADER_HOST = 'host';
export const HEADER_AUTHORIZATION = 'authorization';
export const HEADER_PROXY_AUTHORIZATION = 'proxy-authorization';
export const HEADER_CONNECTION = 'connection';
export const HEADER_CONTENT_LENGTH = 'content-length';
export const HEADER_TRANSFER_ENCODING = 'transfer-encoding';
export const HEADER_WWW_AUTHENTICATE = 'www-authenticate';
export const HEADER_PROXY_AUTHENTICATE = 'proxy-authenticate';
// HTTP Values
export const KEEP_ALIVE = 'keep-alive';
export const CHUNKED = 'chunked';
export const HTTP_VERSION = 'HTTP/1.1';
// Buffer Constants
export const CRLF = '\r\n';
export const CRLF_BUFFER = Buffer.from([13, 10, 13, 10]); // \r\n\r\n
// Timeout Constants
export const DEFAULT_TIMEOUT = 30000; // 30 seconds
export const DEFAULT_CONNECT_TIMEOUT = 10000; // 10 seconds
// Chunked Transfer Constants
export const CHUNK_SIZE_HEX_BASE = 16;
export const MAX_CHUNK_SIZE = 0x1000000; // 16MB
// Authentication Constants
export const NTLM_PREFIX = 'NTLM ';
export const BASIC_PREFIX = 'Basic ';
export const DIGEST_PREFIX = 'Digest ';
/**
 * Check if a status code indicates a redirect
 */
export function isRedirect(status) {
    return status >= REDIRECT_START && status <= REDIRECT_END;
}
/**
 * Check if a status code indicates a client error
 */
export function isClientError(status) {
    return status >= CLIENT_ERROR_START && status <= CLIENT_ERROR_END;
}
/**
 * Check if a status code indicates a server error
 */
export function isServerError(status) {
    return status >= SERVER_ERROR_START && status <= SERVER_ERROR_END;
}
/**
 * Check if a method should not have a body
 */
export function isMethodWithoutBody(method) {
    const upperMethod = method.toUpperCase();
    return upperMethod === METHOD_GET || upperMethod === METHOD_HEAD;
}
/**
 * Check if a method is safe (should not have side effects)
 */
export function isSafeMethod(method) {
    const upperMethod = method.toUpperCase();
    return upperMethod === METHOD_GET || upperMethod === METHOD_HEAD || upperMethod === METHOD_OPTIONS;
}
//# sourceMappingURL=constants.js.map