i use axios call and pass my header token with it but giving error of not found but i tried that same request by postman and it working on that
import axios from "axios";
let githubToken="impassingmytokenhere";
let apiUrl="https://api.github.com/users/repo";
const authAxios = axios.create({
baseURL:apiUrl,
headers:{
Authorization:`Bearer ${githubToken}`
}
})
const xapi= async()=>{
await authAxios.post(apiUrl,{
"name":"test2-api",
"description":"This is a repo from an API key"
})
.then((response)=>console.log(response))
.catch((err)=>console.log(err));
}
xapi();