Fetch with request options

PHOTO EMBED

Sun Sep 11 2022 09:49:08 GMT+0000 (UTC)

Saved by @Marou03 #typescript

const fetchTrainingQueue = () => {
		const requestOptions = {
			method: 'GET',
			headers: {
				"Content-Type": "application/json",
				"Authorization": `Bearer ${props.jwt}`
			},
		};

		fetch('https://api.ai-server.becode.org/get_user_training_queue', requestOptions)
			.then(response => response.json())
			.then(data => {
				setTrainingQueue(data)
			})
	}
content_copyCOPY