Methods
cookies(cookieHeaders) → {ContinueResponseParameters}
Sets the cookies for the response.
Parameters:
Name | Type | Description |
---|---|---|
cookieHeaders | Array.<Header> | The array of cookie headers. |
Throws:
- If the cookieHeader is not an instance of Header.
- Type
- Error
Returns:
- The current instance of the ContinueResponseParameters for chaining.
credentials(username, password) → {ContinueResponseParameters}
Sets the credentials for authentication.
Parameters:
Name | Type | Description |
---|---|---|
username | string | The username for authentication. |
password | string | The password for authentication. |
Throws:
If username or password is not a string.
- Type
- Error
Returns:
The current instance of the ContinueResponseParameters for chaining.
headers(headers) → {ContinueResponseParameters}
Sets the headers for the response.
Parameters:
Name | Type | Description |
---|---|---|
headers | Array.<Header> | An array of Header objects representing the headers. |
Throws:
- If the header value is not an instance of Header.
- Type
- Error
Returns:
- The current instance of the ContinueResponseParameters for chaining.
reasonPhrase(reasonPhrase) → {ContinueResponseParameters}
Sets the reason phrase for the response.
Parameters:
Name | Type | Description |
---|---|---|
reasonPhrase | string | The reason phrase for the response. |
Throws:
- If the reason phrase is not a string.
- Type
- Error
Returns:
- The current instance of the ContinueResponseParameters for chaining.
statusCode(statusCode) → {ContinueResponseParameters}
Sets the status code for the response.
Parameters:
Name | Type | Description |
---|---|---|
statusCode | number | The status code to set. |
Throws:
- If the
statusCode
parameter is not an integer.
- If the
- Type
- Error
Returns:
- The current instance of the ContinueResponseParameters for chaining.