* Retrieves the first value of a given header. * * @param name The header name. * * @returns The value string if the header exists, null otherwise
(name: string)
| 101 | * @returns The value string if the header exists, null otherwise |
| 102 | */ |
| 103 | get(name: string): string | null { |
| 104 | this.init(); |
| 105 | |
| 106 | const values = this.headers.get(name.toLowerCase()); |
| 107 | return values && values.length > 0 ? values[0] : null; |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * Retrieves the names of the headers. |