Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/dynablox_opencloud/src/rest/HTTPResponse.ts>HTTPResponse

A Roblox OpenCloud API wrapper for Deno and NodeJS written in TypeScript.
Latest
class HTTPResponse
import { HTTPResponse } from "https://deno.land/x/dynablox_opencloud@v0.2.2/src/rest/HTTPResponse.ts";

A Dynablox HTTP Response.

Constructors

new
HTTPResponse(
response: Response,
body?: Expect,
)

Construct a new HTTP Response for Dynablox.

Type Parameters

optional
Expect = unknown

Properties

readonly
_request: InternalHTTPRequest

Original request object.

readonly
_response: Response

Original response object.

readonly
body: Expect

Response body.

readonly
headers: Headers

Response headers.

readonly
redirected: boolean

Whether the request was redirected.

readonly
status: HTTPResponseStatus

Status information.

readonly
url: string

Current request URL.

Static Methods

init<Expect>(request: InternalHTTPRequest, response: Response): Promise<HTTPResponse<Expect>>

Parse the response and request then return the parsed body.

parseBody<Expect>(request: InternalHTTPRequest, response: Response): Promise<Expect>

Parse the response and request then return the parsed body.