Will watch videos!
Best posts made by prafful
Latest posts made by prafful
Please share your dashboard public URL's
@kimtimber Have you signed up for full time software engineering 9 days course scheduled for March 2023?
@jojoforce1993 @danielzylomc1234 @maisarasharif98 @syidaa132 @mhdhusaini1346 @sofiaazizan97 @sarahedlen99 @ceapkjxmxjcximw
Can you share your views on these?
- Why do you want to be the software engineer or developer or coder?
- What role did Airasia Academy played in your journey to be the software engineer or developer or coder?
- What do you expect to learn in near future to fulfil your dream of becoming software engineer or developer or coder?
Let's communicate....
@jojoforce1993 @danielzylomc1234 @maisarasharif98 @syidaa132 @mhdhusaini1346 @sofiaazizan97 @sarahedlen99 @ceapkjxmxjcximw
Please post your component visualizations here!
Front end: https://codeisveryeasy.github.io/
Backend: https://lazy-blue-scal*****.*****.app
Database: Mongo DB Cloud
Looks like you wish to send authorization token and request body (data) both with the request. 2 or 3 ways to do it. Any one can be used
- axios interceptors
->https://github.com/axios/axios#interceptors - axios headers -> https://github.com/axios/axios#global-axios-defaults
->axios.defaults.headers.common['Authorization'] = AUTH_TOKEN; - setting the token explicitly on every request using config argument
->
const config = {
headers:{
headera: valuea,
headerb: valueb
}
};
const url = "api end point";
const data ={
name: "Prafful Daga",
email: "prafful@airasia.com"
}
Next,
axios.get(url, config)
.then(res=> console.log(res))
.catch(err=> console.log(err))
OR
axios.post(url, data, config)
.then(res => console.log(res))
.catch(err => console.log(err))
Pl. see if this helps!