@fastly/as-fetch
Version:
 
59 lines (31 loc) • 881 B
Markdown
[@fastly/as-fetch](../README.md) / Status
# Class: Status
An HTTP Status object.
## Table of contents
### Constructors
- [constructor](status.md#constructor)
### Properties
- [code](status.md#code)
### Methods
- [toString](status.md#tostring)
## Constructors
### constructor
• **new Status**(`code`)
Construct a new status instance.
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `code` | `number` | an unsigned 16 bit integer representing the HTTP Status code. |
## Properties
### code
• **code**: `number`
Status code for the HTTP request or response.
## Methods
### toString
▸ **toString**(): `string`
Get the text associated with the status code.
Status text(s) come from:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
#### Returns
`string`
a string containing the text for the Response status code.