File: src/lib/HTTP/RequestFailure.ts

Recommend this page to a friend!
  Classes of Dom Hastings   JS Webdav Client   src/lib/HTTP/RequestFailure.ts   Download  
File: src/lib/HTTP/RequestFailure.ts
Role: Class source
Content type: text/plain
Description: Class source
Class: JS Webdav Client
Access files of a Webdav server
Author: By
Last change:
Date: 8 months ago
Size: 623 bytes


Class file image Download
export class RequestFailure extends Error { #request: Request; #response: Response; constructor(request: Request, response: Response) { super('Request failure'); this.#request = request; this.#response = response; } request(): Request { return this.#request; } response(): Response { return this.#response; } method(): string { return this.#request.method; } url(): string { return this.#request.url; } statusText(): string { return this.#response.statusText; } status(): number { return this.#response.status; } } export default RequestFailure;