Skip to content

Function: extractBoundary()

extractBoundary(contentType): string

Defined in: packages/core/src/batch/batch-parser.ts:30

Extract the boundary value from a Content-Type header.

Handles both quoted (boundary="abc") and unquoted (boundary=abc) formats. Throws ODataValidationError if the boundary parameter is missing.

Parameters

contentType

string

The Content-Type header value (e.g., 'multipart/mixed; boundary=batch_abc123')

Returns

string

The boundary string value

Throws

ODataValidationError if boundary parameter is missing