Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeremyben/tshttp
Low-Level TypeScript HTTP-related Modules.
https://github.com/jeremyben/tshttp
error-handling headers http status typescript
Last synced: 5 days ago
JSON representation
Low-Level TypeScript HTTP-related Modules.
- Host: GitHub
- URL: https://github.com/jeremyben/tshttp
- Owner: jeremyben
- License: mit
- Archived: true
- Created: 2019-08-07T16:25:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-30T20:30:24.000Z (over 1 year ago)
- Last Synced: 2024-09-10T10:59:33.367Z (2 months ago)
- Topics: error-handling, headers, http, status, typescript
- Language: TypeScript
- Size: 278 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tshttp 🧱
> [!WARNING]
> This repo and its packages are deprecated. Please head to its successor: **[@reflet/http](https://github.com/jeremyben/reflet/tree/master/http)**_Low-Level_ TypeScript HTTP-related Modules.
### [@tshttp/status](./status)
```ts
import { Status } from '@tshttp/status'res.status(Status.Created)
```### [@tshttp/header](./header)
```ts
import { ResponseHeader } from '@tshttp/header'res.set(ResponseHeader.ContentType, 'application/json')
```### [@tshttp/error](./error)
```ts
import { HttpError } from '@tshttp/error'throw HttpError(400, 'Nope')
throw HttpError.Forbidden('Access Denied')
```