Open safinsingh opened 1 year ago
index.html
forum.html
script/
fetch
https://github.com/TeamSLAN/striver-frontend/blob/7cb5257ab94f1a96e6de8b5715858bd5ef93cebf/index.html#L8-L18
https://github.com/TeamSLAN/striver-frontend/blob/7cb5257ab94f1a96e6de8b5715858bd5ef93cebf/scripts/quotes.js#L85-L101
window.fetch
JSON.stringify
r.json()
https://github.com/TeamSLAN/striver-frontend/blob/7cb5257ab94f1a96e6de8b5715858bd5ef93cebf/scripts/quotes.js#L66-L83
Purpose
index.html
andforum.html
respectivelyscript/
directoryfetch
to send HTTP requests to our backend on AWSHTML & CSS Usage
https://github.com/TeamSLAN/striver-frontend/blob/7cb5257ab94f1a96e6de8b5715858bd5ef93cebf/index.html#L8-L18
Examples of connection from frontend to backend
POST request
https://github.com/TeamSLAN/striver-frontend/blob/7cb5257ab94f1a96e6de8b5715858bd5ef93cebf/scripts/quotes.js#L85-L101
window.fetch
to make HTTP POST requestJSON.stringify
r.json()
to convert it to a JavaScript ObjectGET request
https://github.com/TeamSLAN/striver-frontend/blob/7cb5257ab94f1a96e6de8b5715858bd5ef93cebf/scripts/quotes.js#L66-L83
window.fetch
to make HTTP GET requestr.json()
to convert it to a JavaScript Object