<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [IncomingMessage](./sip.js.incomingmessage.md) &gt; [s](./sip.js.incomingmessage.s.md)

## IncomingMessage.s() method

Message Header attribute selector. Alias of parseHeader.

<b>Signature:</b>

```typescript
s(name: string, idx?: number): any | undefined;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  name | <code>string</code> | header name |
|  idx | <code>number</code> | header index |

<b>Returns:</b>

`any | undefined`

Parsed header object, undefined if the header is not present or in case of a parsing error.

## Example

message.s('via',3).port

