This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
| /* Using a JavaScript proxy for a super low code REST client */ | |
| // via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg | |
| // also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3 | |
| // also see https://github.com/fastify/manifetch | |
| // also see https://github.com/flash-oss/allserver | |
| // and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
| const createApi = (url) => { | |
| return new Proxy({}, { | |
| get(target, key) { |
This document now exists on the official ASP.NET core docs page.
| // My DB has multiple collections (tables), they can extend | |
| // this since the only difference is the data an collection, | |
| // they're passed in as generics | |
| export interface Record<TData, TCollection> { | |
| data: TData; | |
| ref: { | |
| collection: { | |
| id: TCollection; | |
| }; | |
| id: string; |