次の方法で共有


HttpResponse class

Represents an HTTP response.

Constructors

HttpResponse(number)

Constructs a new instance of HttpResponse with the specified status code.

HttpResponse(number, string)

Constructs a new instance of HttpResponse with the specified status code and message.

HttpResponse(number, string, ArrayBuffer)

Constructs a new instance of HttpResponse with the specified status code, message and binary content.

HttpResponse(number, string, string | ArrayBuffer)

Constructs a new instance of HttpResponse with the specified status code, message and binary content.

HttpResponse(number, string, string)

Constructs a new instance of HttpResponse with the specified status code, message and string content.

Properties

content

The content of the response.

statusCode

The status code of the response.

statusText

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