/[sudobot]/trunk/src/api/Response.ts
ViewVC logotype

Annotation of /trunk/src/api/Response.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 325 - (hide annotations)
Mon Jul 29 17:29:32 2024 UTC (8 months, 1 week ago) by rakin
File MIME type: application/typescript
File size: 314 byte(s)
feat(api): advanced response handling
1 rakin 325 import KeyValuePair from "../types/KeyValuePair";
2    
3     export default class Response {
4     constructor(public readonly status: number, public readonly body: string | object | null | undefined = '', public readonly headers: KeyValuePair<string> = {}) {
5    
6     }
7    
8     toString() {
9     return this.body;
10     }
11     }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26