Analysing data-react class with C++
I’m trying to learn C++ and as a start I’m making a script to analyse fuel prices.
I am doing this by retrieving the HTML data of the gas station of interest utilising CURL. However, one of the companies use a data-react structure which is a bit of challenge to me. I like to do it properly, hence, I prefer to separate the data into its nodes such that I can find the data of interest easily (the fuel price). Googling didn’t make me much wiser, can anybody point me to a (or multiple) pubicly available package(s) suitable for this? I provided a small snippet of the data-react data as an example below. The full element is provided at https://privatebin.net/?8f1be7537d76d200#CFMuNcNR4JHMSQMQSJLFa1NVF4tQ8qjtyW7fatJFt4U.
How can i restrict api access in a react frontend and c# backend app?
I have an app that authenticates a user using MSAL and that is in the client side , react.
But on the backend , c# i make api calls and I want to add some Authorization to only allow users who have successfully logged into the app.
from response header to get Authorization token
if (response.status === 200) { const token = response.headers.get(‘Authorization’); but token come null;
My C# Api:
HttpContext.Response.Headers.Add(“Authorization”, user.Token);
return Ok(userResponse);
This time return 200(OK), and I see network tab this Authorization header, but when trying to take it in Js react,token was came null, but I see Network tab response.header:
How to get Authorization token by response header:
Please help me!!!