Cannot ping or test webhooks through github API

I am trying to ping and test a created webhook through the github API. I am able to both create and get my webhooks through the API. However, when I try and ping and test the hooks, I recieve an Invalid request.\n\n"headers" is not a permitted key error.

My functions are below:

export var testHook = async (access_token, name, creator, hookid) => {

console.log("test hook for user: " + creator + " and repo: " + name + "and hook id: " + hookid)

return axios.post("https://api.github.com/repos/" + creator + "/" + name + "/hooks/" + hookid + "/tests",  

    {

        headers: {

        'Accept': 'application/json',

        'Authorization': 'token ' + access_token

        }

    })

.then(response => {

    console.log("axios gets: " + response.data)

    return response.data;

}).catch(err => {

    console.log(err.response.data)

})

}

export var pingHook = async (access_token, name, creator, hookid) => {

console.log("ping hook for user: " + creator + " and repo: " + name + " and hook id: " + hookid)

return axios.post("https://api.github.com/repos/" + creator + "/" + name + "/hooks/" + hookid + "/pings",  

    {

        headers: {

        'Accept': 'application/json',

        'Authorization': 'token ' + access_token

        }

    })

.then(response => {

    console.log("axios gets: " + response.data)

    return response.data;

}).catch(err => {

    console.log(err.response.data)

})

}

I have also tried to remove the header option, but that just returns me a 404 error.