HttpResponse class
Represents an HTTP response.
Constructors
Http |
Constructs a new instance of HttpResponse with the specified status code. |
Http |
Constructs a new instance of HttpResponse with the specified status code and message. |
Http |
Constructs a new instance of HttpResponse with the specified status code, message and binary content. |
Http |
Constructs a new instance of HttpResponse with the specified status code, message and binary content. |
Http |
Constructs a new instance of HttpResponse with the specified status code, message and string content. |
Properties
content | The content of the response. |
status |
The status code of the response. |
status |
The status message of the response. |
Constructor Details
HttpResponse(number)
Constructs a new instance of HttpResponse with the specified status code.
new HttpResponse(statusCode: number)
Parameters
- statusCode
-
number
The status code of the response.
HttpResponse(number, string)
Constructs a new instance of HttpResponse with the specified status code and message.
new HttpResponse(statusCode: number, statusText: string)
Parameters
- statusCode
-
number
The status code of the response.
- statusText
-
string
The status message of the response.
HttpResponse(number, string, ArrayBuffer)
Constructs a new instance of HttpResponse with the specified status code, message and binary content.
new HttpResponse(statusCode: number, statusText: string, content: ArrayBuffer)
Parameters
- statusCode
-
number
The status code of the response.
- statusText
-
string
The status message of the response.
- content
-
ArrayBuffer
The content of the response.
HttpResponse(number, string, string | ArrayBuffer)
Constructs a new instance of HttpResponse with the specified status code, message and binary content.
new HttpResponse(statusCode: number, statusText: string, content: string | ArrayBuffer)
Parameters
- statusCode
-
number
The status code of the response.
- statusText
-
string
The status message of the response.
- content
-
string | ArrayBuffer
The content of the response.
HttpResponse(number, string, string)
Constructs a new instance of HttpResponse with the specified status code, message and string content.
new HttpResponse(statusCode: number, statusText: string, content: string)
Parameters
- statusCode
-
number
The status code of the response.
- statusText
-
string
The status message of the response.
- content
-
string
The content of the response.
Property Details
content
The content of the response.
public content?: string | ArrayBuffer
Property Value
string | ArrayBuffer
statusCode
The status code of the response.
public statusCode: number
Property Value
number
statusText
The status message of the response.
public statusText?: string
Property Value
string