Difference between revisions of "API Get Teachers"
From zFairs Contest Management
(Created page with "== Get Teachers == Get a list of teachers from our API. <syntaxhighlight lang="JavaScript" line> fetch('/api/data/teachers', { method:'POST', headers:{'Content-Type'...") |
|||
Line 19: | Line 19: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | |||
+ | <br/><br/><br/><br/> | ||
+ | [[Category: API]] |
Revision as of 14:09, 3 November 2021
Get Teachers
Get a list of teachers from our API.
fetch('/api/data/teachers', {
method:'POST',
headers:{'Content-Type': 'application/json'},
body: JSON.stringify({
Username:'admin username',
Password: 'password',
FairId: '9df61f13-474b-442f-ac1f-edca7348ef71', //This value can be found in your url it's the value of f
Body: {}
})
})
.then(response => response.json())
.then(data=>{console.log('Success: ',data);})
.catch((error)=>{console.log('Error: ', error);});