HttpServerResponse

Description

The HttpServerResponse object represents a HTTP response sent from a HttpServer object back to the client.

Overview

Properties

Enumerations

Properties

content

This property holds the content which to serve in the response.

› Type:

HttpContent

› Signal:

contentChanged()

› Attributes:

Writable

headers

This property holds the headers which to send with the response.

› Type:

Map

› Signal:

headersChanged()

› Attributes:

Writable

mimeType

This property holds the MIME type of the response data.

› Type:

String

› Signal:

mimeTypeChanged()

› Attributes:

Writable

statusCode

This property holds the HTTP status code of the response such as 200, 404 etc. See the StatusCode enumeration for details.

› Type:

StatusCode

› Default:

HttpServerResponse.OK

› Signal:

statusCodeChanged()

› Attributes:

Writable

Enumerations

StatusCode

This enumeration describes all available Hypertext Transfer Protocol (HTTP) response status codes. Status codes are issued by a server in response to a client’s request made to the server.

Name

Value

Description

HttpServerResponse.Continue

100

See details on status code 100 .

HttpServerResponse.SwitchingProtocols

101

See details on status code 101 .

HttpServerResponse.Processing

102

See details on status code 102 .

HttpServerResponse.OK

200

See details on status code 200 .

HttpServerResponse.Created

201

See details on status code 201 .

HttpServerResponse.Accepted

202

See details on status code 202 .

HttpServerResponse.NonAuthoritativeInformation

203

See details on status code 203 .

HttpServerResponse.NoContent

204

See details on status code 204 .

HttpServerResponse.ResetContent

205

See details on status code 205 .

HttpServerResponse.PartialContent

206

See details on status code 206 .

HttpServerResponse.MultiStatus

207

See details on status code 207 .

HttpServerResponse.AlreadyReported

208

See details on status code 208 .

HttpServerResponse.IMUsed

226

See details on status code 226 .

HttpServerResponse.MultipleChoices

300

See details on status code 300 .

HttpServerResponse.MovedPermanently

301

See details on status code 301 .

HttpServerResponse.Found

302

See details on status code 302 .

HttpServerResponse.SeeOther

303

See details on status code 303 .

HttpServerResponse.NotModified

304

See details on status code 304 .

HttpServerResponse.UseProxy

305

See details on status code 305 .

HttpServerResponse.TemporaryRedirect

307

See details on status code 307 .

HttpServerResponse.PermanentRedirect

308

See details on status code 308 .

HttpServerResponse.BadRequest

400

See details on status code 400 .

HttpServerResponse.Unauthorized

401

See details on status code 401 .

HttpServerResponse.PaymentRequired

402

See details on status code 402 .

HttpServerResponse.Forbidden

403

See details on status code 403 .

HttpServerResponse.NotFound

404

See details on status code 404 .

HttpServerResponse.MethodNotAllowed

405

See details on status code 405 .

HttpServerResponse.NotAcceptable

406

See details on status code 406 .

HttpServerResponse.ProxyAuthenticationRequired

407

See details on status code 407 .

HttpServerResponse.RequestTimeout

408

See details on status code 408 .

HttpServerResponse.Conflict

409

See details on status code 409 .

HttpServerResponse.Gone

410

See details on status code 410 .

HttpServerResponse.LengthRequired

411

See details on status code 411 .

HttpServerResponse.PreconditionFailed

412

See details on status code 412 .

HttpServerResponse.RequestEntityTooLarge

413

See details on status code 413 .

HttpServerResponse.URITooLong

414

See details on status code 414 .

HttpServerResponse.UnsupportedMediaType

415

See details on status code 415 .

HttpServerResponse.RequestedRangeNotSatisfiable

416

See details on status code 416 .

HttpServerResponse.ExpectationFailed

417

See details on status code 417 .

HttpServerResponse.PolicyNotFulfilled

420

See details on status code 420 .

HttpServerResponse.MisdirectedRequest

421

See details on status code 421 .

HttpServerResponse.UnprocessableEntity

422

See details on status code 422 .

HttpServerResponse.Locked

423

See details on status code 423 .

HttpServerResponse.FailedDependency

424

See details on status code 424 .

HttpServerResponse.UpgradeRequired

426

See details on status code 426 .

HttpServerResponse.PreconditionRequired

428

See details on status code 428 .

HttpServerResponse.TooManyRequests

429

See details on status code 429 .

HttpServerResponse.RequestHeaderFieldsTooLarge

431

See details on status code 431 .

HttpServerResponse.UnavailableForLegalReasons

451

See details on status code 451 .

HttpServerResponse.InternalServerError

500

See details on status code 500 .

HttpServerResponse.NotImplemented

501

See details on status code 501 .

HttpServerResponse.BadGateway

502

See details on status code 502 .

HttpServerResponse.ServiceUnavailable

503

See details on status code 503 .

HttpServerResponse.GatewayTimeout

504

See details on status code 504 .

HttpServerResponse.HttpVersionNotSupported

505

See details on status code 505 .

HttpServerResponse.VariantAlsoNegotiates

506

See details on status code 506 .

HttpServerResponse.InsufficientStorage

507

See details on status code 507 .

HttpServerResponse.LoopDetected

508

See details on status code 508 .

HttpServerResponse.NotExtended

510

See details on status code 510 .

HttpServerResponse.NetworkAuthenticationRequired

511

See details on status code 511 .