---
url: /nestjs-odata/api/generated/functions/extractBoundary.md
---
# Function: extractBoundary()

> **extractBoundary**(`contentType`): `string`

Defined in: [batch/batch-parser.ts:30](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/batch/batch-parser.ts#L30)

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
