Skip to main content
ClientRequest.prototype.getRawHeaderNames - node__http.d.ts - Node documentation
method ClientRequest.prototype.getRawHeaderNames

Usage in Deno

```typescript import { ClientRequest } from "node:node__http.d.ts"; ```
ClientRequest.prototype.getRawHeaderNames(): string[]
Returns an array containing the unique names of the current outgoing raw headers. Header names are returned with their exact casing being set. ```js request.setHeader('Foo', 'bar'); request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); const headerNames = request.getRawHeaderNames(); // headerNames === ['Foo', 'Set-Cookie'] ```

Return Type

string[]