An open API service indexing awesome lists of open source software.

https://github.com/adamjosefus/allo_responses

🦕 Prepared reponse classes for Deno.
https://github.com/adamjosefus/allo_responses

deno http response typescript utils

Last synced: 4 months ago
JSON representation

🦕 Prepared reponse classes for Deno.

Awesome Lists containing this project

README

          

# Allo Reponses for Deno 🦕

Prepared reponse classes for Deno.

## Classes

### `TextResponse`
```ts
const r = new TextResponse('Lorem ipsum');
```

### `JsonResponse`
```ts
const r = new JsonResponse([{ foo: bar }]);
```

### `HtmlResponse`
```ts
const r = new HtmlResponse('

Hello World

');
```

### `FileResponse`
```ts
const r = new FileResponse('/path/to/file.ext');
```
```ts
const file: File = /*...*/;
const r = new FileResponse(file);
```
```ts
const file: Deno.FsFile = /*...*/;
const r = new FileResponse(file);
```

---

## Documentation 📖

Description of all classes and methods with **examples** will found in the [documentation](https://doc.deno.land/https://deno.land/x/allo_responses/mod.ts).

---

Check out other [ours packages 📦](https://deno.land/x?query=allo_)!