heloo
Cookies help Dotnet webapi
try {
const response = await fetch('https://url/api/Auth?Id=5', {
method:"GET",
credentials:'include',
});
// Handle response const data = await response.json() setToken(data.data); } catch (error) { // Handle error console.error('Error:', error); // You may want to display an error message to the user } };
// Handle response const data = await response.json() setToken(data.data); } catch (error) { // Handle error console.error('Error:', error); // You may want to display an error message to the user } };
27 replies
Cookies help Dotnet webapi
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Sun, 05 May 2024 17:40:02 GMT
Server: Kestrel
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: http://localhost:3000
Set-Cookie: refreshToken=iqK2hLxa%2FZLpUODCk7mFfVDVMnx%2BWNJS7amsLKr1NbVlgKVwseXHuDwu92N3QCxcT0LMDbmwe7e5%2BpW2zrah2g%3D%3D; expires=Tue, 04 Jun 2024 17:40:02 GMT; path=/; samesite=strict; httponly
Transfer-Encoding: chunked
Vary: Origin
27 replies