diff --git a/source/http/http.ts b/source/http/http.ts new file mode 100644 index 0000000000..6835cf2201 --- /dev/null +++ b/source/http/http.ts @@ -0,0 +1,28 @@ +namespace $ { + export class $mol_source_http_json extends $mol_source { + + query() { + return {} + } + + base() { + return '' + } + + @ $mol_mem + uri() { + let url = this.base() + + const search = '' + new URLSearchParams( this.query() ) + if( search ) url += ( url.includes( '?' ) ? '&' : '?' ) + search + + return url + } + + @ $mol_mem + output() { + return this.$.$mol_fetch.json( this.uri() ) + } + + } +} diff --git a/source/source.ts b/source/source.ts new file mode 100644 index 0000000000..c59874bfe5 --- /dev/null +++ b/source/source.ts @@ -0,0 +1,9 @@ +namespace $ { + export class $mol_source extends $mol_object2 { + + output() { + return null as any + } + + } +}