mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-15 12:24:47 +00:00
implement this.fetch (#178)
This commit is contained in:
12
test/app/routes/credentials/index.html
Normal file
12
test/app/routes/credentials/index.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<h1>{{message}}</h1>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
preload({ query }) {
|
||||
console.log(`here ${this.fetch}`);
|
||||
return this.fetch(`credentials/test.json`, {
|
||||
credentials: query.creds
|
||||
}).then(r => r.json());
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user